Просмотр исходного кода

Fixing blowfish_secret length (too short)

phpMyAdmin "screams", we should be using length of 32 characters for blowfish_secret.
Luka Paunović 7 лет назад
Родитель
Сommit
aeee40865e
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      install/vst-install-rhel.sh

+ 4 - 1
install/vst-install-rhel.sh

@@ -83,6 +83,9 @@ gen_pass() {
     echo "$PASS"
 }
 
+# Defining 32 char blowfish_secret
+blowfish_secret=`openssl rand -base64 32`;
+
 # Defining return code check function
 check_result() {
     if [ $1 -ne 0 ]; then
@@ -1043,7 +1046,7 @@ if [ "$mysql" = 'yes' ]; then
         cp -f $vestacp/pma/phpMyAdmin.conf /etc/httpd/conf.d/
     fi
     cp -f $vestacp/pma/config.inc.conf /etc/phpMyAdmin/config.inc.php
-    sed -i "s/%blowfish_secret%/$(gen_pass)/g" /etc/phpMyAdmin/config.inc.php
+    sed -i "s/%blowfish_secret%/$blowfish_secret/g" /etc/phpMyAdmin/config.inc.php
 fi