tsanitize inputs in network dialog - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 5f09ba661a4f2c6ffa6d2e54e80db5ff1d3f6685 DIR parent 511b23fee6940681701ef83950fdd8f95b0bd9e8 HTML Author: ThomasV <thomasv@electrum.org> Date: Wed, 28 Oct 2015 12:07:45 +0100 sanitize inputs in network dialog Diffstat: M gui/qt/network_dialog.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- DIR diff --git a/gui/qt/network_dialog.py b/gui/qt/network_dialog.py t@@ -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(),