1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-19 20:38:00 +01:00

Experimental/Testing:

- Added support for using kdesu instead of gksu where it makes sense.
- Improved code used to sanitize network keys used with wpa_passphrase.
- Removed some unused functions and imports.
- Cleaned up some comments/docstrings.

Experimental:
- Split gui.py into gui.py and netentry.py.  netentry is imported by gui.py to make use of NetworkEntry and its subclasses.
- Reorganzed how dbus and the language dict are used in wicd.py and gui.py.
This commit is contained in:
imdano
2008-06-11 20:13:32 +00:00
parent 316e4a4dd2
commit 81470bb96b
6 changed files with 1199 additions and 1085 deletions

View File

@@ -676,8 +676,15 @@ class WirelessConnectThread(ConnectThread):
"""
def _sanitize(key):
""" Escapes characters wpa_supplicant doesn't handle properly. """
return key.replace("$", "\$").replace("`", "\`").replace("\"",
"\\\"")
new_key = []
blacklist = ["$", "`", "\""]
for c in key:
if c in blacklist:
new_key.append("\\" + c)
else:
new_key.append(c)
return ''.join(new_key)
# Check to see if we need to generate a PSK (only for non-ralink
# cards).
if self.network.get('key'):