Regular expression for getting essid fails sometimes

Bug #1042290 reported by Roberto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wicd
Fix Committed
High
David Paleino

Bug Description

I've found that Wicd fails to parse the essid in some systems. Wifi driver is marvell sd8686, works with wpa_supplicant -D wext. This is the regular expression used by wicd to get the essid, taken from latest source code revision, in file wnettools.py:

essid_pattern = re.compile('.*ESSID:"(.*?)".*\n', _re_mode)

For some reason my system reports the essid with some trailing numbers that are not part of the essid, like this:

iwlist eth0 scanning
eth0 Scan completed :
          Cell 01 - Address: XX:XX:XX:XX:XX:XX
                    ESSID:"WLAN_1111"
                    [...]
          Cell 02 - Address: XX:XX:XX:XX:XX:XX
                    ESSID:"MyHomeWifi" [2]
                    [...]
          Cell 03 - Address: XX:XX:XX:XX:XX:XX
                    ESSID:"WLAN_2222" [3]
                    [...]

Wicd seems to be confused with the trailing numbers and will create an invalid wpa_supplicant config. I've verified that this regular expression works for this particular case (as a test, not a real fix because it may fail for others):

essid_pattern = re.compile('.*ESSID:"(.*?)".*\n', _re_mode)

Related branches

Revision history for this message
Roberto (rgs) wrote :

Sorry, I've noticed that I've pasted the same regular expression twice, this is the original:

essid_pattern = re.compile('.*ESSID:"?(.*?)"?\s*\n', _re_mode)

and this is the one that works in my case:

essid_pattern = re.compile('.*ESSID:"(.*?)".*\n', _re_mode)

Revision history for this message
PCManiac (pcmaniacpt) wrote :

Greetings,

Kindly check my bug report which was fixed by the author just now @irc: https://bugs.launchpad.net/wicd/+bug/1047652

Best regards

David Paleino (dpaleino)
Changed in wicd:
milestone: none → 1.7.3
assignee: nobody → David Paleino (dpaleino)
importance: Undecided → High
status: New → Triaged
Revision history for this message
David Paleino (dpaleino) wrote :
Changed in wicd:
status: Triaged → Fix Committed
Revision history for this message
Roberto (rgs) wrote :

Thank you.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.