electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 5f09ba661a4f2c6ffa6d2e54e80db5ff1d3f6685
parent 511b23fee6940681701ef83950fdd8f95b0bd9e8
Author: ThomasV <thomasv@electrum.org>
Date:   Wed, 28 Oct 2015 12:07:45 +0100

sanitize inputs in network dialog

Diffstat:
Mgui/qt/network_dialog.py | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gui/qt/network_dialog.py b/gui/qt/network_dialog.py @@ -224,9 +224,14 @@ class NetworkDialog(QDialog): if not self.exec_(): return - host = str( self.server_host.text() ) - port = str( self.server_port.text() ) + host = str(self.server_host.text()) + port = str(self.server_port.text()) protocol = 's' if self.ssl_cb.isChecked() else 't' + # sanitize + try: + deserialize_server(serialize_server(host, port, protocol)) + except: + return if self.proxy_mode.currentText() != 'NONE': proxy = { 'mode':str(self.proxy_mode.currentText()).lower(),