From c87b3b88710edcd94d1b3cc41af631d50c24e195 Mon Sep 17 00:00:00 2001 From: David Paleino Date: Sun, 15 Jan 2012 15:21:16 +0100 Subject: [PATCH] A hopefully better attempt at ESSIDs with '\x00' in them --- wicd/wnettools.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wicd/wnettools.py b/wicd/wnettools.py index 3b316e2..0f7f0d4 100644 --- a/wicd/wnettools.py +++ b/wicd/wnettools.py @@ -1252,6 +1252,11 @@ class BaseWirelessInterface(BaseInterface): print 'Unicode problem with current network essid, ignoring!!' return None + # We (well, DBus) don't support ESSIDs with null bytes in it. + # From some bugreports, it seems like some APs transmit the "hidden" + # essid as NULL bytes. Let's strip them off. + ap['essid'].replace('\x00', '') + if ap['essid'] in ['Hidden', '', "", None]: print 'hidden' ap['hidden'] = True