Wicd fails to connect when passphrase uses spaces

Bug #308415 reported by BillyBob
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wicd
Fix Released
Medium
Dan O'Reilly
Trunk
Fix Released
Medium
Dan O'Reilly

Bug Description

I am not sure who gets this one. I know what the issue is, just don't know who is exactly responsible for it, wicd or wpa_passphrase. Here it is:

If the pass phrase that is used contains spaces, as in "The crazy fox jumps over the fence" (Ignoring the quotes), generation of the psk fails. wpa_passphrase only uses the first word (I presume because of shell interpretation) , "The", thinks it's too short and fails with an error "Need 8..64 Characters". Even if the first word meet the 8 character minimum, it would only use the first word, but generate an incorrect key on just the first word.

Samples:

[19:59][root@arnie-laptop:~]# TEST="The crazy fox jumps over the fence"

[20:01][root@arnie-laptop:~]# wpa_passphrase BigBen $TEST
Passphrase must be 8..63 characters

[20:03][root@arnie-laptop:~]# wpa_passphrase BigBen "$TEST"
network={
        ssid="BigBen"
        #psk="The crazy fox jumps over the fence"
        psk=e1ef530a6d2ae912dedf5a5c0e1ca3423c8ddb98af113eb02fbfa35915e553fe
}

Command line next:

[20:03][root@arnie-laptop:~]# wpa_passphrase BigBen
# reading passphrase from stdin
The crazy fox jumps over the fence
network={
        ssid="BigBen"
        #psk="The crazy fox jumps over the fence"
        psk=e1ef530a6d2ae912dedf5a5c0e1ca3423c8ddb98af113eb02fbfa35915e553fe
}

Wicd 1.5.6

Now this functioned before in Wicd and failed in the update to 1.5.6, however there were a pile of other updates that happened at the same time. I do believe I was using 1.5.4 previously to the update on 12/12/08 that knocked me dead in the water.

I am using Wubi with an installed kubuntu 4.1.3 on an Intel Core2 Duo.

Wicd log:

2008/12/15 13:04:46 :: Connecting to wireless network BigBen
2008/12/15 13:04:46 :: Putting interface down
2008/12/15 13:04:46 :: Releasing DHCP leases...
2008/12/15 13:04:46 :: Setting false IP...
2008/12/15 13:04:46 :: Stopping wpa_supplicant and any DHCP clients
2008/12/15 13:04:46 :: Flushing the routing table...
2008/12/15 13:04:46 :: Generating psk...
2008/12/15 13:04:46 :: WARNING: PSK generation failed! Falling back to wireless key.
2008/12/15 13:04:46 :: Please report this error to the wicd developers!
2008/12/15 13:04:46 :: Attempting to authenticate...
2008/12/15 13:04:46 :: Putting interface up...
2008/12/15 13:04:49 :: wpa_supplicant rescan forced...
2008/12/15 13:05:32 :: wpa_supplicant authentication may have failed.
2008/12/15 13:05:32 :: exiting connection thread
2008/12/15 13:05:36 :: Attempting to autoconnect with wired interface...Putting interface down

Fails because of failure to double quote the passphrase and it has spaces.

Log entry without spaces in passphrase: Same passphrase with underscores in place of spaces.

2008/12/15 18:59:09 :: Connecting to wireless network BigBen
2008/12/15 18:59:09 :: Putting interface down
2008/12/15 18:59:10 :: Releasing DHCP leases...
2008/12/15 18:59:10 :: Setting false IP...
2008/12/15 18:59:10 :: Stopping wpa_supplicant and any DHCP clients
2008/12/15 18:59:10 :: Flushing the routing table...
2008/12/15 18:59:10 :: Generating psk...
2008/12/15 18:59:10 :: Attempting to authenticate...
2008/12/15 18:59:11 :: Putting interface up...
2008/12/15 18:59:14 :: Running DHCP
2008/12/15 18:59:14 :: Internet Systems Consortium DHCP Client V3.1.1
2008/12/15 18:59:14 :: Copyright 2004-2008 Internet Systems Consortium.
2008/12/15 18:59:14 :: All rights reserved.
2008/12/15 18:59:14 :: For info, please visit http://www.isc.org/sw/dhcp/
2008/12/15 18:59:14 ::
2008/12/15 18:59:14 :: wmaster0: unknown hardware address type 801
2008/12/15 18:59:15 :: wmaster0: unknown hardware address type 801
2008/12/15 18:59:15 :: Listening on LPF/wlan0/00:1c:bf:87:95:ba
2008/12/15 18:59:15 :: Sending on LPF/wlan0/00:1c:bf:87:95:ba
2008/12/15 18:59:15 :: Sending on Socket/fallback
2008/12/15 18:59:19 :: DHCPREQUEST of 10.168.2.101 on wlan0 to 255.255.255.255 port 67
2008/12/15 18:59:19 :: DHCPNAK from 10.168.1.1
2008/12/15 18:59:29 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
2008/12/15 18:59:29 :: DHCPOFFER of 10.168.1.20 from 10.168.1.1
2008/12/15 18:59:29 :: DHCPREQUEST of 10.168.1.20 on wlan0 to 255.255.255.255 port 67
2008/12/15 18:59:29 :: DHCPACK of 10.168.1.20 from 10.168.1.1
2008/12/15 18:59:29 :: bound to 10.168.1.20 -- renewal in 36042 seconds.
2008/12/15 18:59:29 :: DHCP connection successful
2008/12/15 18:59:29 :: Connecting thread exiting.

If I am in the wrong pew with this report, please don't flame me. I honestly don't know who (whoever maintains wpa_passphrase or wicd or both) is responsible, but I figured I'd start here.

Thanks for your assistance.

Related branches

Revision history for this message
Dan O'Reilly (oreilldf) wrote :

This should be fixed in the bzr trunk, give that a try.

Changed in wicd:
assignee: nobody → oreilldf
status: New → Incomplete
Revision history for this message
BillyBob (wicd) wrote :

BZR? Expand please.

Revision history for this message
Dan O'Reilly (oreilldf) wrote :

bzr = Bazaar, the version control software we use. Click the "Code" tab at the top of this page, it'll take you to a page where all our Bazaar branches are listed. You want the one labelled "lp:wicd". You can get it by downloading bzr and running "bzr branch lp:wicd". Then follow the instructions in the included INSTALL file.

Revision history for this message
BillyBob (wicd) wrote :

Thanks a bunch. Will try that...

Revision history for this message
BillyBob (wicd) wrote :

That works nicely. Thanks a bunch...

Revision history for this message
Adam Blackburn (adamblackburn) wrote :

Marking fixed as per the last comment.

Changed in wicd:
importance: Undecided → Medium
status: Incomplete → Fix Committed
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.