Secret key must be at least 64 bytes

This commit is contained in:
Bob Mottram 2017-11-07 21:17:18 +00:00
parent 3708790d82
commit 14f3964eae
1 changed files with 3 additions and 3 deletions

View File

@ -211,9 +211,9 @@ function pleroma_create_database {
run_system_query_postgresql "set statement_timeout to 20000;"
read_config_param "PLEROMA_SECRET_KEY"
if [ ${#PLEROMA_SECRET_KEY} -lt 50 ]; then
PLEROMA_SECRET_KEY="$(create_password 30)$(create_password 30)"
if [ ${#PLEROMA_SECRET_KEY} -lt 50 ]; then
if [ ${#PLEROMA_SECRET_KEY} -lt 64 ]; then
PLEROMA_SECRET_KEY="$(create_password 30)$(create_password 30)$(create_password 30)"
if [ ${#PLEROMA_SECRET_KEY} -lt 64 ]; then
run_system_query_postgresql "ALTER USER pleroma NOSUPERUSER;"
run_system_query_postgresql "ALTER USER pleroma NOCREATEDB;"
echo $'Pleroma secret key not created'