ssid with double space not stored correctly
Jouni Malinen
j at w1.fi
Mon Dec 11 02:15:23 PST 2017
On Sun, Dec 10, 2017 at 05:56:29PM +0100, Erich Titl wrote:
> I am running wpa_supplicant 2.6 on an embedded linux platform. It
> appears that ssid's with double white space is not correctly written to
> wpa_supplicant using wpa_cli
>
> SALT# wpa_cli set_network 23 ssid \"NOS-CAFE DA MARINA\"
Please note that this gets processed by the shell and since the full
SSID value was not quoted, the shell will parse this in a way that
removes duplicated whitespace between the command line arguments.
> It feels like double spaces are somehow suppressed in wpa_cli
wpa_cli does not do this, the shell command line parsing does.. You'll
get the exact same behavior with other programs like echo:
$ echo \"NOS-CAFE DA MARINA\"
"NOS-CAFE DA MARINA"
$ echo '"NOS-CAFE DA MARINA"'
"NOS-CAFE DA MARINA"
wpa_cli does try to parse together the value from multiple command line
arguments, but it does not get knowledge of what kind of whitespace was
used between them, so it cannot build the correct value in some cases.
Providing the full value as a single command line argument (like that
second echo example above) is a more robust way of doing this.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list