From 14f3964eae77d4a812ca15587c5a651af290afdd Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 7 Nov 2017 21:17:18 +0000 Subject: [PATCH] Secret key must be at least 64 bytes --- src/freedombone-app-pleroma | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/freedombone-app-pleroma b/src/freedombone-app-pleroma index 6637ba21..fef6e695 100755 --- a/src/freedombone-app-pleroma +++ b/src/freedombone-app-pleroma @@ -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'