diff options
author | Marc Delisle <marc@infomarc.info> | 2015-10-13 18:32:21 +0300 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2015-10-13 18:32:21 +0300 |
commit | 7ddbfefb9d7cd21c96c8cbe8d2282e8f2bb474bf (patch) | |
tree | 6084bfe47f745bee4969b3e43d4b5f512a66d982 /user_password.php | |
parent | b2de929be4425ee983eac9aacea7ee7edb7a1122 (diff) | |
parent | 8a82a04ff95045b6c9e7a2ac387a16c32cd657de (diff) |
Fix merge conflicts
Signed-off-by: Marc Delisle <marc@infomarc.info>
Diffstat (limited to 'user_password.php')
-rw-r--r-- | user_password.php | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/user_password.php b/user_password.php index 05d930074c..269d517111 100644 --- a/user_password.php +++ b/user_password.php @@ -144,10 +144,16 @@ function PMA_changePassword($password, $message, $change_password_message) $curr_user = $row['user']; list($username, $hostname) = explode('@', $curr_user); - if (PMA\libraries\Util::getServerType() === 'MySQL' && PMA_MYSQL_INT_VERSION >= 50706) { + $serverType = PMA\libraries\Util::getServerType(); + + if ($serverType === 'MySQL' + && PMA_MYSQL_INT_VERSION >= 50706 + ) { - if (isset($_REQUEST['pw_hash']) && ! empty($_REQUEST['pw_hash'])) { - $orig_auth_plugin = $_REQUEST['pw_hash']; + if (isset($_REQUEST['authentication_plugin']) + && ! empty($_REQUEST['authentication_plugin']) + ) { + $orig_auth_plugin = $_REQUEST['authentication_plugin']; } else { $orig_auth_plugin = PMA_getCurrentAuthenticationPlugin( 'change', $username, $hostname @@ -158,11 +164,15 @@ function PMA_changePassword($password, $message, $change_password_message) . '\' IDENTIFIED WITH ' . $orig_auth_plugin . ' BY ' . (($password == '') ? '\'\'' : '\'***\''); } else { - // For MySQL versions 5.6.6+, + // For MySQL versions 5.5.7+ and MariaDB versions 5.2+, // explicitly set value of `old_passwords` so that // it does not give an error while using // the PASSWORD() function - if (PMA_MYSQL_INT_VERSION >= 50606) { + if (($serverType == 'MySQL' + && PMA_MYSQL_INT_VERSION >= 50507) + || ($serverType == 'MariaDB' + && PMA_MYSQL_INT_VERSION >= 50200) + ) { $orig_auth_plugin = PMA_getCurrentAuthenticationPlugin( 'change', $username, $hostname ); |