1
0
mirror of https://github.com/gryf/wicd.git synced 2026-01-31 13:05:49 +01:00

Fix bug where encryption keys with non-ascii characters caused crashes.

Only write settings being saved if debug mode is on.
Clear keys entered through the GUI when the encryption checkbox is disabled.
This commit is contained in:
Dan O'Reilly
2009-01-17 12:58:02 -05:00
parent 4f22df62b0
commit 75219d78c4
3 changed files with 15 additions and 12 deletions

View File

@@ -471,17 +471,16 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
if encryption_info[x].get_text() == "":
error(self, language['encrypt_info_missing'])
return False
self.set_net_prop(x, noneToString(encryption_info[x].
get_text()))
self.set_net_prop(x, noneToString(encryption_info[x].get_text()))
elif not self.chkbox_encryption.get_active() and \
wireless.GetWirelessProperty(networkid, "encryption"):
error(self, language['enable_encryption'])
return False
else:
print 'encryption is ' + str(wireless.GetWirelessProperty(networkid,
"encryption"))
print "no encryption specified..."
self.set_net_prop("enctype", "None")
for x in self.encryption_info:
self.set_net_prop(x, "")
AdvancedSettingsDialog.save_settings(self)
if self.chkbox_global_settings.get_active():