Fixed setting password on recent MariaDB with non working plugins

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ř <michal@cihar.com>
This commit is contained in:
Michal Čihař 2017-03-21 08:23:06 +01:00
parent 211541f56e
commit 2e448d46e3
2 changed files with 7 additions and 1 deletions

View File

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

View File

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