lakinduakash / linux-wifi-hotspot

Feature-rich wifi hotspot creator for Linux which provides both GUI and command-line interface. It is also able to create a hotspot using the same wifi card which is connected to an AP already ( Similar to Windows 10).
BSD 2-Clause "Simplified" License
3.21k stars 295 forks source link

Spaces stripped from SSID & password #112

Closed ghost closed 3 years ago

ghost commented 3 years ago

https://github.com/lakinduakash/linux-wifi-hotspot/blob/ea40a80eea3d9b4964be1921b3699332d0795f6c/src/ui/read_config.cpp#L60

The above code removes all spaces from the config file, so any spaces in the SSID or password set by the user are ignored. I don't know why spaces are removed at all, but at least preserve those that part of the user input.

lakinduakash commented 3 years ago

That should be corrected for the password. But in other config values, we need to properly remove such as trailing whitespaces properly. otherwise, it can affect string comparisons when parsing the config file. I think we need to make an exception for the password field only.

ghost commented 3 years ago

I think we need to make an exception for the password field only.

Why not for the SSID? 'My Hotspot' is a valid SSID.

lakinduakash commented 3 years ago

Yes, I forgot that. Can you make a PR for this?