From 4f66476de580f5747393c3068e7a3aa30042a68a Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Mon, 9 Dec 2024 21:22:37 +0100 Subject: [PATCH] Update Password Creation to only create Chars (#750) --- install/umami-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/umami-install.sh b/install/umami-install.sh index f913128f..28dc0687 100644 --- a/install/umami-install.sh +++ b/install/umami-install.sh @@ -37,7 +37,7 @@ msg_ok "Installed Node.js" msg_info "Setting up postgresql" DB_NAME=umamidb DB_USER=umami -DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"