mirror of
https://github.com/gryf/wicd.git
synced 2025-12-22 22:27:59 +01:00
trunk/experiementa/pluggablebackends:
- Fix crash due to _sanitize_string getting None passed in.
This commit is contained in:
@@ -80,6 +80,10 @@ SIOCGIWAP = 0x8B15
|
|||||||
def _sanitize_string(string):
|
def _sanitize_string(string):
|
||||||
blacklist = [';', '`', '$', '!', '*', '|', '>', '<']
|
blacklist = [';', '`', '$', '!', '*', '|', '>', '<']
|
||||||
new_string = []
|
new_string = []
|
||||||
|
|
||||||
|
if not string:
|
||||||
|
return string
|
||||||
|
|
||||||
for c in string:
|
for c in string:
|
||||||
if c in blacklist:
|
if c in blacklist:
|
||||||
new_string.append("\\" + c)
|
new_string.append("\\" + c)
|
||||||
|
|||||||
Reference in New Issue
Block a user