fix: bcrypt plaintext password
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Markus Pesch 2021-09-03 16:32:54 +02:00
parent 8161245db9
commit 89c2365406
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
2 changed files with 5 additions and 1 deletions

View File

@ -24,7 +24,7 @@ ENV POSTFIXADMIN_DATABASE_TYPE=sqlite \
# docker-entrypoint.sh dependencies # docker-entrypoint.sh dependencies
RUN set -eux; \ RUN set -eux; \
apt-get update; \ apt-get update; \
apt-get install --yes --no-install-recommends gosu; \ apt-get install --yes --no-install-recommends gosu apache2-utils; \
rm --recursive --force /var/lib/apt/lists/* rm --recursive --force /var/lib/apt/lists/*
# Install required PHP extensions # Install required PHP extensions

View File

@ -40,6 +40,10 @@ if [ "${POSTFIXADMIN_DATABASE_TYPE}" = 'sqlite' ]; then
fi fi
fi fi
# bycrypt POSTFIXADMIN_SETUP_PASSWORD
if [ ! -z ${POSTFIXADMIN_SETUP_PASSWORD+x} ]; then
POSTFIXADMIN_SETUP_PASSWORD=$(htpasswd -bnBC 10 "" "${POSTFIXADMIN_SETUP_PASSWORD}" | tr -d ':\n')
fi
# create config.local.pgp with vaules from env with POSTFIXADMIN_ prefix # create config.local.pgp with vaules from env with POSTFIXADMIN_ prefix
POSTFIXADMIN_ENV_VARS=($(env | sort | grep --perl-regexp '^POSTFIXADMIN_.*')) POSTFIXADMIN_ENV_VARS=($(env | sort | grep --perl-regexp '^POSTFIXADMIN_.*'))