mazi-project / portal

This is the portal of the MAZI toolkit
http://www.mazizone.eu/toolkit/
MIT License
18 stars 6 forks source link

Failing to connect to WiFi that has space in its SSID #161

Closed panosnethood closed 5 years ago

panosnethood commented 5 years ago

I had this problem since long time (not being able to connect to certain WiFi networks).

I digged more into this and I think I found the bug. It happens when there is a space in the SSID of the WiFi network.

Here is the debug message when connecting to a WiFi with spaces in its SSID:

D, [2018-12-29 16:39:17 #622] DEBUG -- : request: post/exec from ip: 127.0.0.1 params: {"env"=>"sh", "cmd"=>"antenna.sh", "interface"=>"wlan1", "ssid"=>"FRITZ!Box 5490 TO", "hidden-ssid"=>"", "password"=>"290298"} D, [2018-12-29 16:39:17 #622] DEBUG -- : $ sh /root/back-end/antenna.sh -s FRITZ!Box 5490 TO -i 'wlan1' -p 29029875319635550027

As you see, the script "antenna.sh" is called without quotes being placed around the WiFi name causing an error. I guess the same would happen if there were spaces in the password, which is also placed without quotes.

haniavis commented 5 years ago

this is now fixed in v3.0.3