From 96176589cab4aa97f2d6ce8c8c3a15bf2828858d Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Thu, 28 Sep 2023 09:33:41 -0700 Subject: [PATCH] Updates the secret key generation to override locale settings and provide more entropy (#4277) --- install-paperless-ngx.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install-paperless-ngx.sh b/install-paperless-ngx.sh index 561c4e748..24aedba3c 100755 --- a/install-paperless-ngx.sh +++ b/install-paperless-ngx.sh @@ -38,7 +38,6 @@ ask_docker_folder() { echo "Invalid folder: $result" fi - done } @@ -321,7 +320,8 @@ fi wget "https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/docker/compose/docker-compose.$DOCKER_COMPOSE_VERSION.yml" -O docker-compose.yml wget "https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/docker/compose/.env" -O .env -SECRET_KEY=$(tr --delete --complement 'a-zA-Z0-9' < /dev/urandom 2>/dev/null | head --bytes 64) +SECRET_KEY=$(LC_ALL=C tr -dc 'a-zA-Z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/urandom | head --bytes 64) + DEFAULT_LANGUAGES=("deu eng fra ita spa")