-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apostrophe in SSID generates an invalid firstrun.sh #486
Comments
Ran into this as well! |
Same issue here, using an apostrophe character ( The apostrophe is not properly escaped: 'mySSIDWith\'Apostrophe' Something like 'mySSIDWith'\''Apostrophe' Environment
Current workaroundDowngrade to Raspberry Pi Imager v1.7.2, that doesn't seem to be affected by this issue |
This bit me too. My workaround was to manually edit line 42 in the generated |
The problem was introduced in 4961990. It tries to use the |
I just ran into this! For fellow googlers out there, here's the exact error message on boot:
At this point, it powers down.
|
Probably an even cleaner solution would be to prefix the string with
Though having said that I notice |
I ended up deleting my comment because the second workaround actually didn't work. But am happy to report that the 1.7.4 version of the imager seems to have fixed the problem. |
I ran into this problem as well and my solution was to change my SSID to the hex representation, similarly as is already done with the passphrase. This seemed the safest option to me, because no quoting mistakes can be made and it definitely avoids shell injection attacks or similar problems. https://web.mit.edu/freebsd/head/contrib/wpa/wpa_supplicant/wpa_supplicant.conf says:
|
Well, on Windows, OSX and Linux, any user (not just root/administrator) can access files on the FAT partition of removable drives. |
Hi @maxnet, to be honest, your answer really worked me up. Let me explain why. I gave a hint about how to build this feature more secure, but instead of approaching this possibility you brushed it away. Yes, your threat model may make this not a necessary security improvement, but other people's threat models may. I won't go into a discussion about under which conditions it could be a valid security issue. These discussions usually only waste time and energy magnitudes higher that it would've to simply implement the more secure way. Instead, I'll let you know what your message communicated to me.
Now, quite honestly, writing this post might already have taken longer than looking up how the hex encoding of the password is done and applying it to the SSID as well. So, maybe I am guilty of my own complaint, too, but maybe my message resonates with you and I made this world a little bit better. I'll try to find the corresponding code and make a PR now. |
Your PR is unlikely to work without new RPI OS images... And no, doing configuration by passing user input as parameter to a script (that resulted in this issue in the first place) wasn't my personal preference either. And yes, I am aware that comes with other issues than just escaping on multi-user systems. |
After RPi-Distro/raspberrypi-sys-mods#83 |
firstrun.sh
does not correctly escape single quote in WiFi SSIDs, leading to a pi that simply powers off on first boot.There's a few other similar things that shellcheck catches in there, also.
The text was updated successfully, but these errors were encountered: