FS#68996 - connmanctl fails to connect to WiFi network having passwords ending with a backslash character

Attached to Project: Arch Linux
Opened by Bob (IWantBackSlashes) - Tuesday, 15 December 2020, 23:01 GMT
Last edited by Doug Newgard (Scimmia) - Tuesday, 15 December 2020, 23:40 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
connmanctl fails to connect to WiFi network having passwords ending with a backslash character (i.e. '\').

See the following commands entered consecutively in bash on my machine (observe the Passphrase value in both cat invocation):

openelec:~/.cache/connman/wifi_dca632348f72_50726574747920666c7920666f7220612057694669_managed_psk # cat settings
[wifi_dca632348f72_50726574747920666c7920666f7220612057694669_managed_psk]
Name=My wifi network
SSID=50726574747920666c7920666f7220612057694669
Frequency=5180
Favorite=true
AutoConnect=true
Modified=2020-12-15T22:28:21Z
Passphrase="kjHTJ235nnM!0\
IPv4.method=dhcp
IPv4.DHCP.LastAddress=192.168.87.29
IPv6.method=off
IPv6.privacy=disabled

openelec:~/.cache/connman/wifi_dca632348f72_50726574747920666c7920666f7220612057694669_managed_psk # connmanctl connect wifi_dca632348f72_50726574747920666c7920666f7220612057694669_managed_psk
Error /net/connman/service/wifi_dca632348f72_50726574747920666c7920666f7220612057694669_managed_psk: Input/output error

openelec:~/.cache/connman/wifi_dca632348f72_50726574747920666c7920666f7220612057694669_managed_psk # cat settings
[wifi_dca632348f72_50726574747920666c7920666f7220612057694669_managed_psk]
Name=My wifi network
SSID=50726574747920666c7920666f7220612057694669
Frequency=5180
Favorite=true
AutoConnect=true
Modified=2020-12-15T22:28:21Z
Passphrase="kjHTJ235nnM!0
IPv4.method=dhcp
IPv4.DHCP.LastAddress=192.168.87.29
IPv6.method=off
IPv6.privacy=disabled

The content of the setting file shown with cat differs between the 2 invocations as the ending backslash char has been removed from the passphrase value in the second one after trying to connect the network with connman.

Please note that connman connects seamlessly on another network with a simpler password on the very same router.
Also note that any modern WiFi tool (e.g. wpa_supplicant) offers the possibility to store hashed passphrases rather than clear ones in a config file, for 2 good reasons:
1. It is safer and good practice to store a hashed password rather than a clear one;
2. a hash will never have any special character issue such as the one described in this ticket.

For the story, the reason why I fiddled with connmanctl is that openelec provides a GUI for the WiFi settings which initially failed on my network having a password ending with a backslash character (i.e. '\'), whereas another network on the same router with a very simple password connected successfuly.

Additional info:
* package version(s)
1.38 (shipped on latest openelec distro for raspberry pi)
* config and/or log files etc.
See above

Steps to reproduce:
Create a WiFi configuration for a network with a password ending with a backslash character (i.e. '<whatever_you_fancy>\') and try the commands listed above.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Tuesday, 15 December 2020, 23:40 GMT
Reason for closing:  Not a bug
Additional comments about closing:  This is the Arch Linux bug tracker. I have no idea why you're here.

Loading...