sanitize inputs in network dialog

This commit is contained in:
ThomasV 2015-10-28 12:07:45 +01:00
parent 511b23fee6
commit 5f09ba661a
1 changed files with 7 additions and 2 deletions

View File

@ -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(),