Skip to content

Commit 7579a52

Browse files
authored
fix: create url safe db passwords (#1799)
1 parent 04660f2 commit 7579a52

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: cli/template/extras/start-database/mysql.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ if [ "$DB_PASSWORD" == "password" ]; then
3535
echo "Please set a password in the .env file and try again"
3636
exit 1
3737
fi
38-
DB_PASSWORD=$(openssl rand -base64 12)
38+
# Generate a random URL-safe password
39+
DB_PASSWORD=$(openssl rand -base64 12 | tr '+/' '-_')
3940
sed -i -e "s#:password@#:$DB_PASSWORD@#" .env
4041
fi
4142

Diff for: cli/template/extras/start-database/postgres.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ if [ "$DB_PASSWORD" = "password" ]; then
3535
echo "Please set a password in the .env file and try again"
3636
exit 1
3737
fi
38-
DB_PASSWORD=$(openssl rand -base64 12)
38+
# Generate a random URL-safe password
39+
DB_PASSWORD=$(openssl rand -base64 12 | tr '+/' '-_')
3940
sed -i -e "s#:password@#:$DB_PASSWORD@#" .env
4041
fi
4142

0 commit comments

Comments
 (0)