Secret key must be at least 64 bytes
This commit is contained in:
parent
3708790d82
commit
14f3964eae
|
@ -211,9 +211,9 @@ function pleroma_create_database {
|
||||||
run_system_query_postgresql "set statement_timeout to 20000;"
|
run_system_query_postgresql "set statement_timeout to 20000;"
|
||||||
|
|
||||||
read_config_param "PLEROMA_SECRET_KEY"
|
read_config_param "PLEROMA_SECRET_KEY"
|
||||||
if [ ${#PLEROMA_SECRET_KEY} -lt 50 ]; then
|
if [ ${#PLEROMA_SECRET_KEY} -lt 64 ]; then
|
||||||
PLEROMA_SECRET_KEY="$(create_password 30)$(create_password 30)"
|
PLEROMA_SECRET_KEY="$(create_password 30)$(create_password 30)$(create_password 30)"
|
||||||
if [ ${#PLEROMA_SECRET_KEY} -lt 50 ]; then
|
if [ ${#PLEROMA_SECRET_KEY} -lt 64 ]; then
|
||||||
run_system_query_postgresql "ALTER USER pleroma NOSUPERUSER;"
|
run_system_query_postgresql "ALTER USER pleroma NOSUPERUSER;"
|
||||||
run_system_query_postgresql "ALTER USER pleroma NOCREATEDB;"
|
run_system_query_postgresql "ALTER USER pleroma NOCREATEDB;"
|
||||||
echo $'Pleroma secret key not created'
|
echo $'Pleroma secret key not created'
|
||||||
|
|
Loading…
Reference in New Issue