From 2e448d46e3293e35b2d93b1862e9523182594c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 21 Mar 2017 08:23:06 +0100 Subject: [PATCH] Fixed setting password on recent MariaDB with non working plugins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the plugins are not working (eg. the plugins directory does not exist), we should still allow to change the password. Fixes #12757 Signed-off-by: Michal Čihař --- ChangeLog | 1 + libraries/server_privileges.lib.php | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1a65b310f8..2c6ece691d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -105,6 +105,7 @@ phpMyAdmin - ChangeLog - issue #13088 Fixed editing of rows with text primary key - issue #13092 Do not try to sync favorite tables if configuration storage is not enabled - issue #13105 Fixed changing attribute for virtual field +- issue #12757 Fixed setting password on recent MariaDB with non working plugins 4.6.6 (2017-01-23) - issue #12759 Fix Notice regarding 'Undefined index: old_usergroup' diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php index 1dbae9e7a2..16cce961ae 100644 --- a/libraries/server_privileges.lib.php +++ b/libraries/server_privileges.lib.php @@ -5048,10 +5048,15 @@ function PMA_checkIfMariaDBPwdCheckPluginActive() return false; } - $result = $GLOBALS['dbi']->query( + $result = $GLOBALS['dbi']->tryQuery( 'SHOW PLUGINS SONAME LIKE \'%_password_check%\'' ); + /* Plugins are not working, for example directory does not exists */ + if ($result === false) { + return false; + } + while ($row = $GLOBALS['dbi']->fetchAssoc($result)) { if ($row['Status'] === 'ACTIVE') { return true;