diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index fea6b94615416fc349a2e5fcd4b13330705e4633..a2e1f89360d55f9cc6220d10720f05a669f16c58 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -234,6 +234,13 @@ class installer_base { die(); } + $unwanted_sql_plugins = array('validate_password'); + $sql_plugins = $inst->db->queryAllRecords("SELECT plugin_name FROM information_schema.plugins WHERE plugin_status='ACTIVE' AND plugin_name IN ?", $unwanted_sql_plugins); + if(is_array($sql_plugins) && !empty($sql_plugins)) { + foreach ($sql_plugins as $plugin) echo "Login in to MySQL and disable $plugin[plugin_name] with:\n\n UNINSTALL PLUGIN $plugin[plugin_name];"; + die(); + } + //** Create the database if(!$this->db->query('CREATE DATABASE IF NOT EXISTS ?? DEFAULT CHARACTER SET ?', $conf['mysql']['database'], $conf['mysql']['charset'])) { $this->error('Unable to create MySQL database: '.$conf['mysql']['database'].'.'); diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php index 7c30bc676793abb95162791b64c7ba5150b0fb01..6f29acefd3cb1a19df273ff208dace5e059328f2 100644 --- a/install/lib/update.lib.php +++ b/install/lib/update.lib.php @@ -132,6 +132,13 @@ function updateDbAndIni() { die(); } + $unwanted_sql_plugins = array('validate_password'); + $sql_plugins = $inst->db->queryAllRecords("SELECT plugin_name FROM information_schema.plugins WHERE plugin_status='ACTIVE' AND plugin_name IN ?", $unwanted_sql_plugins); + if(is_array($sql_plugins) && !empty($sql_plugins)) { + foreach ($sql_plugins as $plugin) echo "Login in to MySQL and disable $plugin[plugin_name] with:\n\n UNINSTALL PLUGIN $plugin[plugin_name];"; + die(); + } + //* Update $conf array with values from the server.ini that shall be preserved $tmp = $inst->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']); $ini_array = ini_to_array(stripslashes($tmp['config'])); diff --git a/server/plugins-available/mysql_clientdb_plugin.inc.php b/server/plugins-available/mysql_clientdb_plugin.inc.php index 804bdbaa749992f84b81564d181e969b764d24e5..028aaa9158dc527932e4bc583fd691d3e5319a29 100644 --- a/server/plugins-available/mysql_clientdb_plugin.inc.php +++ b/server/plugins-available/mysql_clientdb_plugin.inc.php @@ -73,7 +73,20 @@ class mysql_clientdb_plugin { function process_host_list($action, $database_name, $database_user, $database_password, $host_list, $link, $database_rename_user = '', $user_access_mode = 'rw') { global $app; - + + // check mysql-plugins + $unwanted_sql_plugins = array('validate_password'); // strict-password-validation + $temp = "'".implode("','", $unwanted_sql_plugins)."'"; + $result = $link->query("SELECT plugin_name FROM information_schema.plugins WHERE plugin_status='ACTIVE' AND plugin_name IN ($temp)"); + if($result) { + while ($row = $result->fetch_assoc()) { + $sql_plugins[] = $row['plugin_name']; + } + $result->free(); + foreach ($sql_plugins as $plugin) $app->log("MySQL-Plugin $plugin[plugin_name] enabled - can not execute function process_host_list", LOGLEVEL_ERROR); + return false; + } + if(!$user_access_mode) $user_access_mode = 'rw'; $action = strtoupper($action);