Browse Source

Automated ViMbAdmin security salt

bugfixes
gau1991 10 years ago
parent
commit
05fc3dfe5c
  1. 7
      bin/easyengine
  2. 9
      src/vendor/ee_ven_setup_vimbadmin.sh

7
bin/easyengine

@ -125,7 +125,7 @@ elif [ "$EE_FIRST" = "stack" ] || [ "$EE_FIRST" = "system" ]; then
ee_ven_install_utils
# Display success message
ee_lib_echo "Successfully installed all packages"
ee_lib_echo "Successfully installed web server packages"
ee_lib_echo "Create your first WordPress site powered by NGINX using:"
ee_lib_echo_info "ee site create example.com --wp"
fi
@ -180,7 +180,10 @@ elif [ "$EE_FIRST" = "stack" ] || [ "$EE_FIRST" = "system" ]; then
ee_lib_git /etc/nginx/ /etc/dovecot /etc/postfix /etc/amavis "Initialize Git"
ee_lib_echo "Successfully installed mail server"
# Display message for mail server
ee_lib_echo "Successfully installed mail server packages"
ee_lib_echo "Open https://(hostname -f):22222/vimbadmin in your browser"
ee_lib_echo "Security Salt=${ee_security_salt}"
fi

9
src/vendor/ee_ven_setup_vimbadmin.sh

@ -64,4 +64,13 @@ function ee_ven_setup_vimbadmin()
/var/www/22222/htdocs/vimbadmin/bin/doctrine2-cli.php orm:schema-tool:create &>> $EE_COMMAND_LOG \
|| ee_lib_error "Unable to setup ViMbAdmin default database , exit status = " $?
ee_security_salt=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 64 | head -n1)
sed -i "s/securitysalt = \"\"/securitysalt = \"$ee_security_salt\"/" /var/www/22222/htdocs/vimbadmin/application/configs/application.ini
ee_rememberme_salt=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 64 | head -n1)
sed -i "s/resources.auth.oss.rememberme.salt = \"\"/resources.auth.oss.rememberme.salt = \"$ee_rememberme_salt\"/" /var/www/22222/htdocs/vimbadmin/application/configs/application.ini
ee_password_salt=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 64 | head -n1)
sed "s/defaults.mailbox.password_salt = \"\"/defaults.mailbox.password_salt = \"$ee_password_salt\"/"
}

Loading…
Cancel
Save