Skip to content

Commit b860952

Browse files
authored
Merge pull request #154 from linuxserver/sedpass
fix db password setting (sed escape &)
2 parents 0a8973b + d346059 commit b860952

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
276276

277277
## Versions
278278

279+
* **05.01.23:** - Fix db password setting (sed escape `&`).
279280
* **21.12.22:** - Update db info in .env file when env vars are updated.
280281
* **10.10.22:** - Remove password escape logic which caused problems for a small subset of users.
281282
* **20.08.22:** - Rebasing to alpine 3.15 with php8. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base)).

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ app_setup_block: |
104104
105105
# changelog
106106
changelogs:
107+
- { date: "05.01.23:", desc: "Fix db password setting (sed escape `&`)." }
107108
- { date: "21.12.22:", desc: "Update db info in .env file when env vars are updated." }
108109
- { date: "10.10.22:", desc: "Remove password escape logic which caused problems for a small subset of users." }
109110
- { date: "20.08.22:", desc: "Rebasing to alpine 3.15 with php8. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base))." }

root/etc/cont-init.d/50-config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ if [[ -n "${DB_HOST}" ]]; then
9292
sed -i -E "s/^[#]?DB_PORT=.*/DB_PORT=${DB_PORT}/g" /config/www/.env
9393
sed -i -E "s/^[#]?DB_DATABASE=.*/DB_DATABASE=${DB_DATABASE}/g" /config/www/.env
9494
sed -i -E "s/^[#]?DB_USERNAME=.*/DB_USERNAME=${DB_USER}/g" /config/www/.env
95-
sed -i -E "s/^[#]?DB_PASSWORD=.*/DB_PASSWORD=${DB_PASS}/g" /config/www/.env
95+
sed -i -E "s/^[#]?DB_PASSWORD=.*/DB_PASSWORD=${DB_PASS//&/\\&}/g" /config/www/.env
9696
fi
9797

9898
# set appurl

0 commit comments

Comments
 (0)