Skip to content

Commit 2e9e08e

Browse files
authored
Merge pull request #140 from linuxserver/remove-escape-logic
Remove db_pass escape logic
2 parents e192345 + 46db2c5 commit 2e9e08e

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Container images are configured using parameters passed at runtime (such as thos
158158
| `-e APP_URL=` | for specifying the IP:port or URL your application will be accessed on (ie. `http://192.168.1.1:6875` or `https://bookstack.mydomain.com` |
159159
| `-e DB_HOST=<yourdbhost>` | for specifying the database host |
160160
| `-e DB_USER=<yourdbuser>` | for specifying the database user |
161-
| `-e DB_PASS=<yourdbpass>` | for specifying the database password |
161+
| `-e DB_PASS=<yourdbpass>` | for specifying the database password (non-alphanumeric passwords must be properly escaped.) |
162162
| `-e DB_DATABASE=bookstackapp` | for specifying the database to be used |
163163
| `-v /config` | this will store any uploaded data on the docker host |
164164

@@ -271,6 +271,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
271271

272272
## Versions
273273

274+
* **10.10.22:** - Remove password escape logic which caused problems for a small subset of users.
274275
* **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)).
275276
* **14.03.22:** - Add symlinks for theme support.
276277
* **11.07.21:** - Rebase to Alpine 3.14.

readme-vars.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ param_env_vars:
2929
- { env_var: "DB_HOST", env_value: "<yourdbhost>", desc: "for specifying the database host" }
3030
- { env_var: "DB_USER", env_value: "<yourdbuser>", desc: "for specifying the database user" }
3131
- { env_var: "DB_PASS", env_value: "<yourdbpass>", desc: "for specifying the database password" }
32-
- { env_var: "DB_DATABASE", env_value: "bookstackapp", desc: "for specifying the database to be used" }
32+
- { env_var: "DB_DATABASE", env_value: "bookstackapp", desc: "for specifying the database to be used (non-alphanumeric passwords must be properly escaped.)" }
3333

3434
param_usage_include_ports: true
3535
param_ports:
@@ -101,6 +101,7 @@ app_setup_block: |
101101
102102
# changelog
103103
changelogs:
104+
- { date: "10.10.22:", desc: "Remove password escape logic which caused problems for a small subset of users." }
104105
- { 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))." }
105106
- { date: "14.03.22:", desc: "Add symlinks for theme support." }
106107
- { date: "11.07.21:", desc: "Rebase to Alpine 3.14." }

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,10 @@ fi
6363
if [ "${DB_USER}" ];
6464
then
6565
echo "Running config - db_user set"
66-
ESCAPED_PASSWORD=$(sed -E 's/('\'')/\\\1/g' <<< $DB_PASS)
6766
sed -i "s/DB_HOST=localhost/DB_HOST=${DB_HOST}/g" /config/www/.env
6867
sed -i "s/DB_DATABASE=database_database/DB_DATABASE=${DB_DATABASE}/g" /config/www/.env
6968
sed -i "s/DB_USERNAME=database_username/DB_USERNAME=${DB_USER}/g" /config/www/.env
70-
sed -i "s/DB_PASSWORD=database_user_password/DB_PASSWORD=${ESCAPED_PASSWORD}/g" /config/www/.env
69+
sed -i "s/DB_PASSWORD=database_user_password/DB_PASSWORD=${DB_PASS}/g" /config/www/.env
7170
fi
7271

7372
# set appurl

0 commit comments

Comments
 (0)