Skip to content

Commit 05ac720

Browse files
authored
remove escape logic for passwords
if linuxserver/docker-bookstack#140 works, we should replicate. do not merge until we consider the above PR to be sufficiently tested (but before end of month so i can get a tshirt ;)
1 parent 2bffc8b commit 05ac720

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

root/etc/cont-init.d/40-initialise-db

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
4444
else
4545
TEST_LEN=${#MYSQL_ROOT_PASSWORD}
4646
fi
47-
MYSQL_ROOT_PASSWORD=$(sed -E 's/('\'')/\\\1/g' <<< "${MYSQL_ROOT_PASSWORD}")
4847
if [ "${TEST_LEN}" -lt "4" ]; then
4948
MYSQL_PASS="CREATE USER 'root'@'%' IDENTIFIED BY '' ;"
5049
else
@@ -57,7 +56,6 @@ if [ "${MYSQL_USER+x}" ] && \
5756
[ "${MYSQL_DATABASE+x}" ] && \
5857
[ "${MYSQL_PASSWORD+x}" ] && \
5958
[ "${#MYSQL_PASSWORD}" -gt "3" ]; then
60-
MYSQL_PASSWORD=$(sed -E 's/('\'')/\\\1/g' <<< "${MYSQL_PASSWORD}")
6159
read -r -d '' MYSQL_DB_SETUP << EOM
6260
CREATE DATABASE \`${MYSQL_DATABASE}\`;
6361
CREATE USER '${MYSQL_USER}'@'%' IDENTIFIED BY '${MYSQL_PASSWORD}';

0 commit comments

Comments
 (0)