mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-04 04:56:52 +00:00
Merge pull request #7382 from nextcloud/enh/noid/url-encode-passwords
notify-push & whiteboard: URL-encode passwords
This commit is contained in:
commit
d0bac46b94
4 changed files with 9 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ RUN set -ex; \
|
||||||
netcat-openbsd \
|
netcat-openbsd \
|
||||||
tzdata \
|
tzdata \
|
||||||
bash \
|
bash \
|
||||||
|
jq \
|
||||||
openssl; \
|
openssl; \
|
||||||
# Give root a random password
|
# Give root a random password
|
||||||
echo "root:$(openssl rand -base64 12)" | chpasswd; \
|
echo "root:$(openssl rand -base64 12)" | chpasswd; \
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,10 @@ if [ "$POSTGRES_USER" = nextcloud ]; then
|
||||||
export POSTGRES_USER
|
export POSTGRES_USER
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# URL-encode passwords
|
||||||
|
POSTGRES_PASSWORD="$(jq -rn --arg v "$POSTGRES_PASSWORD" '$v|@uri')"
|
||||||
|
REDIS_HOST_PASSWORD="$(jq -rn --arg v "$REDIS_HOST_PASSWORD" '$v|@uri')"
|
||||||
|
|
||||||
# Postgres root cert
|
# Postgres root cert
|
||||||
if [ -f "/nextcloud/data/certificates/POSTGRES" ]; then
|
if [ -f "/nextcloud/data/certificates/POSTGRES" ]; then
|
||||||
CERT_OPTIONS="?sslmode=verify-ca&sslrootcert=/nextcloud/data/certificates/ca-bundle.crt"
|
CERT_OPTIONS="?sslmode=verify-ca&sslrootcert=/nextcloud/data/certificates/ca-bundle.crt"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ FROM ghcr.io/nextcloud-releases/whiteboard:v1.5.0
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
apk add --no-cache bash; \
|
apk add --no-cache bash jq; \
|
||||||
chmod 777 -R /tmp; \
|
chmod 777 -R /tmp; \
|
||||||
if [ -f /usr/lib/chromium/chrome_crashpad_handler ] && [ ! -f /usr/lib/chromium/chrome_crashpad_handler.real ]; then \
|
if [ -f /usr/lib/chromium/chrome_crashpad_handler ] && [ ! -f /usr/lib/chromium/chrome_crashpad_handler.real ]; then \
|
||||||
mv /usr/lib/chromium/chrome_crashpad_handler /usr/lib/chromium/chrome_crashpad_handler.real; \
|
mv /usr/lib/chromium/chrome_crashpad_handler /usr/lib/chromium/chrome_crashpad_handler.real; \
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,9 @@ if [ -z "$REDIS_DB_INDEX" ]; then
|
||||||
REDIS_DB_INDEX=0
|
REDIS_DB_INDEX=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# URL-encode password
|
||||||
|
REDIS_HOST_PASSWORD="$(jq -rn --arg v "$REDIS_HOST_PASSWORD" '$v|@uri')"
|
||||||
|
|
||||||
export REDIS_URL="redis://$REDIS_USER:$REDIS_HOST_PASSWORD@$REDIS_HOST:$REDIS_PORT/$REDIS_DB_INDEX"
|
export REDIS_URL="redis://$REDIS_USER:$REDIS_HOST_PASSWORD@$REDIS_HOST:$REDIS_PORT/$REDIS_DB_INDEX"
|
||||||
|
|
||||||
# Run it
|
# Run it
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue