From 79994a1262b4cced1dd8387162c8a758bd38524a Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 25 Mar 2019 12:22:25 +0100 Subject: [PATCH] increase password size --- CHANGELOG.md | 2 + wo/cli/plugins/secure.py | 2 +- wo/cli/plugins/site_functions.py | 65 ++++++++++++++++---------------- wo/cli/plugins/stack.py | 2 +- 4 files changed, 37 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a4eca0..f9145ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - "--letsencrypt=subdomain" option - hardened nginx ssl_ecdh_curve - Update phpredisadmin +- Increase MySQL root password size to 16 characters +- Increase MySQL users password size to 16 characters #### Fixed diff --git a/wo/cli/plugins/secure.py b/wo/cli/plugins/secure.py index ae2b9eb..cb6305a 100644 --- a/wo/cli/plugins/secure.py +++ b/wo/cli/plugins/secure.py @@ -50,7 +50,7 @@ class WOSecureController(CementBaseController): """This function secures authentication""" passwd = ''.join([random.choice (string.ascii_letters + string.digits) - for n in range(6)]) + for n in range(16)]) if not self.app.pargs.user_input: username = input("Provide HTTP authentication user " "name [{0}] :".format(WOVariables.wo_user)) diff --git a/wo/cli/plugins/site_functions.py b/wo/cli/plugins/site_functions.py index e84226c..28a3faa 100644 --- a/wo/cli/plugins/site_functions.py +++ b/wo/cli/plugins/site_functions.py @@ -306,9 +306,9 @@ def setupwordpress(self, data): "\n\ndefine(\'WP_DEBUG\', false);")) try: if WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root" - .format(WOVariables.wo_wpcli_path) - + " core config " - + "--dbname=\'{0}\' --dbprefix=\'{1}\' " + .format(WOVariables.wo_wpcli_path) + + " core config " + + "--dbname=\'{0}\' --dbprefix=\'{1}\' " "--dbuser=\'{2}\' --dbhost=\'{3}\' " .format(data['wo_db_name'], wo_wp_prefix, data['wo_db_user'], data['wo_db_host'] @@ -330,11 +330,11 @@ def setupwordpress(self, data): else: Log.debug(self, "Generating wp-config for WordPress multisite") Log.debug(self, "bash -c \"php {0} --allow-root " - .format(WOVariables.wo_wpcli_path) - + "core config " - + "--dbname=\'{0}\' --dbprefix=\'{1}\' --dbhost=\'{2}\' " - .format(data['wo_db_name'], wo_wp_prefix, data['wo_db_host']) - + "--dbuser=\'{0}\' --dbpass=\'{1}\' " + .format(WOVariables.wo_wpcli_path) + + "core config " + + "--dbname=\'{0}\' --dbprefix=\'{1}\' --dbhost=\'{2}\' " + .format(data['wo_db_name'], wo_wp_prefix, data['wo_db_host']) + + "--dbuser=\'{0}\' --dbpass=\'{1}\' " "--extra-php<