Merge pull request #1841 from lukapaunovic/patch-1

Fixing blowfish_secret length (too short) [phpMyAdmin]
This commit is contained in:
Anton Reutov 2019-03-23 15:01:44 +03:00 committed by GitHub
commit 2bde9c6e47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -74,6 +74,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
@ -1023,7 +1026,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

View file

@ -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