Selaa lähdekoodia

Secret key must be at least 64 bytes

Bob Mottram 7 vuotta sitten
vanhempi
commit
14f3964eae
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3
    3
      src/freedombone-app-pleroma

+ 3
- 3
src/freedombone-app-pleroma Näytä tiedosto

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