Bug description
As the replacement of config var values in env-setup.sh uses sed, the replacement string might contain a "wrong" value.
For instance .env contains RASPAP_SSID_PASS=Change&Me, which results in the line wpa_passphrase=Changewpa_passphrase=ChangeMeMe in /etc/hostapd/hostapd.conf.
Ampersand (&) is apparently a special character in the sed replacement string, that matches the "old string" (the string sed should replace).
An ampersand (‘&’) appearing in the replacement is replaced by the string matching the regular expression. The string ‘#’, where ‘#’ is a digit, is replaced by the text matched by the corresponding backreference expression (see re_format(7)).
All other instances of a backslash will print the literal character following it. Using a backslash before any other character other than ‘&’, ‘\’, digit, newline (ascii 0x0a), and the delimiter is unspecified and might not be portable to other implementations of sed.
https://man.openbsd.org/sed.1
I guess there should be some escaping of special characters
Related issues
Steps to Reproduce
- Configure
RASPAP_SSID_PASS=Change&Me in docker-compose.yaml
- Bring containers up with
docker compose up -d
- Go inside container with
docker execc -it raspap bash
- Check file inside container
cat /etc/hostapd/hostapd.conf
These common fixes didn't resolve my issue
Bug description
As the replacement of config var values in
env-setup.shusessed, the replacement string might contain a "wrong" value.For instance
.envcontainsRASPAP_SSID_PASS=Change&Me, which results in the linewpa_passphrase=Changewpa_passphrase=ChangeMeMein/etc/hostapd/hostapd.conf.Ampersand (&) is apparently a special character in the
sedreplacement string, that matches the "old string" (the stringsedshould replace).I guess there should be some escaping of special characters
Related issues
Steps to Reproduce
RASPAP_SSID_PASS=Change&Meindocker-compose.yamldocker compose up -ddocker execc -it raspap bashcat /etc/hostapd/hostapd.confThese common fixes didn't resolve my issue
docker runexample(s) in the readme (removing any customizations I added)