瀏覽代碼

Secret key must be at least 64 bytes

Bob Mottram 7 年之前
父節點
當前提交
14f3964eae
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. 3
    3
      src/freedombone-app-pleroma

+ 3
- 3
src/freedombone-app-pleroma 查看文件

211
     run_system_query_postgresql "set statement_timeout to 20000;"
211
     run_system_query_postgresql "set statement_timeout to 20000;"
212
 
212
 
213
     read_config_param "PLEROMA_SECRET_KEY"
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
             run_system_query_postgresql "ALTER USER pleroma NOSUPERUSER;"
217
             run_system_query_postgresql "ALTER USER pleroma NOSUPERUSER;"
218
             run_system_query_postgresql "ALTER USER pleroma NOCREATEDB;"
218
             run_system_query_postgresql "ALTER USER pleroma NOCREATEDB;"
219
             echo $'Pleroma secret key not created'
219
             echo $'Pleroma secret key not created'