From 404bea4755c8d64e259d30be42661e42b9a3b973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristjan=20R=C3=A4ts?= Date: Mon, 7 Sep 2015 10:15:05 +0200 Subject: [PATCH 1/4] Translated using Weblate (Estonian) Currently translated at 100.0% (3210 of 3210 strings) [CI skip] --- po/et.po | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/po/et.po b/po/et.po index 2c23db35df..fd2025f413 100644 --- a/po/et.po +++ b/po/et.po @@ -6,16 +6,16 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.5.1-dev\n" "Report-Msgid-Bugs-To: translators@phpmyadmin.net\n" "POT-Creation-Date: 2015-10-09 07:21-0400\n" -"PO-Revision-Date: 2015-09-07 10:15+0200\n" +"PO-Revision-Date: 2015-10-12 07:52+0200\n" "Last-Translator: Kristjan Räts \n" -"Language-Team: Estonian \n" +"Language-Team: Estonian " +"\n" "Language: et\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 2.4-dev\n" +"X-Generator: Weblate 2.5-dev\n" #: changelog.php:37 license.php:30 #, php-format @@ -954,10 +954,9 @@ msgid "Do you really want to TRUNCATE the selected partition(s)?" msgstr "Kas sa soovid tõesti kärpida (TRUNCATE) valitud partitsioone?" #: js/messages.php:66 -#, fuzzy #| msgid "Do you really want to execute \"%s\"?" msgid "Do you really want to RESET SLAVE?" -msgstr "Kas tõesti tahad käivitada \"%s\"?" +msgstr "Kas tõesti tahad käivitada käsu RESET SLAVE?" #: js/messages.php:68 msgid "" From bd49edfb90aef82c20ad27de5143691f754d5a54 Mon Sep 17 00:00:00 2001 From: Deven Bansod Date: Sat, 10 Oct 2015 22:57:07 +0530 Subject: [PATCH 2/4] Fix 11561 Signed-off-by: Deven Bansod --- libraries/dbi/DBIDummy.class.php | 5 + libraries/display_change_password.lib.php | 140 ++++++++++------------ libraries/server_privileges.lib.php | 122 +++++++++++++------ 3 files changed, 151 insertions(+), 116 deletions(-) diff --git a/libraries/dbi/DBIDummy.class.php b/libraries/dbi/DBIDummy.class.php index fd2b5f9a2c..58ab193d4e 100644 --- a/libraries/dbi/DBIDummy.class.php +++ b/libraries/dbi/DBIDummy.class.php @@ -653,6 +653,11 @@ $GLOBALS['dummy_queries'] = array( array( 'query' => "SELECT @@lower_case_table_names", 'result' => array() + ), + array( + 'query' => "SELECT `PLUGIN_NAME`, `PLUGIN_DESCRIPTION` " + . "FROM `information_schema`.`PLUGINS` WHERE `PLUGIN_TYPE` = 'AUTHENTICATION';", + 'result' => array() ) ); /** diff --git a/libraries/display_change_password.lib.php b/libraries/display_change_password.lib.php index 0b65e3d6b8..0ed22b3a9f 100644 --- a/libraries/display_change_password.lib.php +++ b/libraries/display_change_password.lib.php @@ -77,88 +77,74 @@ function PMA_getHtmlForChangePassword($username, $hostname) . $chg_evt_handler . '="nopass[1].checked = true" />' . '' . ''; - $default_auth_plugin = PMA_getCurrentAuthenticationPlugin( - 'change', $username, $hostname - ); - // See http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-5.html - if (PMA_Util::getServerType() == 'MySQL' - && PMA_MYSQL_INT_VERSION >= 50705 + $html .= '' + . '' . __('Password Hashing:') . ''; + + $serverType = PMA_Util::getServerType(); + if (($serverType == 'MySQL' + && PMA_MYSQL_INT_VERSION >= 50507) + || ($serverType == 'MariaDB' + && PMA_MYSQL_INT_VERSION >= 50200) ) { - $html .= '' - . '' . __('Password Hashing:') . '' - . '' - . '' - . __('MySQL native password') - . '' - . '' - . '' - . '' - . ' ' - . '' - . '' - . __('SHA256 password') - . '' - . '' - . ''; - } elseif (PMA_Util::getServerType() == 'MySQL' - && PMA_MYSQL_INT_VERSION >= 50606 - ) { - $html .= '' - . '' . __('Password Hashing:') . '' - . '' - . '' - . '' - . '' - . ''; - } else { - $html .= '' - . '' . __('Password Hashing:') . '' - . '' - . '' - . '' - . '' - . '' - . '' - . ' ' - . '' - . '' - . '' - . '' - . ''; - } - $html .= ''; + $active_auth_plugins = PMA_getActiveAuthPlugins(); - $html .= '
' - . PMA_Message::notice( - __( - 'This method requires using an \'SSL connection\' ' - . 'or an \'unencrypted connection that encrypts the password ' - . 'using RSA\'; while connecting to the server.' + $default_auth_plugin = PMA_getCurrentAuthenticationPlugin( + 'change', $username, $hostname + ); + + $iter = 0; + $total_plugins = count($active_auth_plugins); + foreach ($active_auth_plugins as $plugin) { + if ($plugin['PLUGIN_NAME'] == 'mysql_old_password') { + continue; + } + + if ($iter != 0) { + $html .= ' '; + } + $html .= '' + . '' + . ''; + + if ($iter == $total_plugins - 2) { + $html .= ''; + } else if ($iter != $total_plugins - 1) { + $html .= ''; + } + $iter++; + } + + $html .= ''; + $html .= ''; + + $html .= '
' + . PMA_Message::notice( + __( + 'This method requires using an \'SSL connection\' ' + . 'or an \'unencrypted connection that encrypts the password ' + . 'using RSA\'; while connecting to the server.' + ) + . PMA_Util::showMySQLDocu('sha256-authentication-plugin') ) - . PMA_Util::showMySQLDocu('sha256-authentication-plugin') - ) - ->getDisplay() - . '
'; + ->getDisplay() + . '
'; + } else { + $html .= '' + . '' + . '' + . '' + . ''; + } $html .= '' . '' . "\n"; @@ -1883,7 +1920,9 @@ function PMA_updatePassword($err_url, $username, $hostname) $local_query = $query_prefix . PMA_Util::sqlAddSlashes($_POST['pma_pw']) . "'"; } else { - if (! empty($_REQUEST['pw_hash']) && $_REQUEST['pw_hash'] == 'old') { + if (! empty($_REQUEST['pw_hash']) + && $_REQUEST['pw_hash'] == 'mysql_old_password' + ) { $hashing_function = 'OLD_PASSWORD'; } elseif (! empty($_REQUEST['pw_hash']) && $_REQUEST['pw_hash'] == 'sha256_password' @@ -4108,6 +4147,8 @@ function PMA_setProperPasswordHashing($auth_plugin) // to be of type depending upon $authentication_plugin if ($auth_plugin == 'sha256_password') { $GLOBALS['dbi']->tryQuery('SET `old_passwords` = 2'); + } else if ($auth_plugin == 'mysql_old_password') { + $GLOBALS['dbi']->tryQuery('SET `old_passwords` = 1'); } else { $GLOBALS['dbi']->tryQuery('SET `old_passwords` = 0'); } @@ -4968,6 +5009,13 @@ function PMA_getSqlQueriesForDisplayAndAddUser($username, $hostname, $password) ); $real_sql_query = $sql_query = $sql_query_stmt; + // Set the proper hashing method + if (isset($_REQUEST['authentication_plugin'])) { + PMA_setProperPasswordHashing( + $_REQUEST['authentication_plugin'] + ); + } + // Use 'SET PASSWORD' for pre-5.7.6 MySQL versions // and pre-5.2.0 MariaDB if (($serverType == 'MySQL' @@ -4975,6 +5023,7 @@ function PMA_getSqlQueriesForDisplayAndAddUser($username, $hostname, $password) || ($serverType == 'MariaDB' && PMA_MYSQL_INT_VERSION < 50200) ) { + if ($_POST['pred_password'] == 'keep') { $password_set_real = sprintf( $password_set_stmt, @@ -5000,11 +5049,6 @@ function PMA_getSqlQueriesForDisplayAndAddUser($username, $hostname, $password) } else { $password_set_real = null; - // Set the proper hashing method - PMA_setProperPasswordHashing( - $_REQUEST['authentication_plugin'] - ); - // Required for binding '%' with '%s' $create_user_stmt = str_replace( '%', '%%', $create_user_stmt From 7a69c9a71b9426ef228ae3a09e723074d5373229 Mon Sep 17 00:00:00 2001 From: Giovanni Sora Date: Mon, 12 Oct 2015 22:37:32 +0200 Subject: [PATCH 3/4] Translated using Weblate (Interlingua) Currently translated at 70.4% (2263 of 3210 strings) [CI skip] --- po/ia.po | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/po/ia.po b/po/ia.po index 7a30efb10b..3e980c33f6 100644 --- a/po/ia.po +++ b/po/ia.po @@ -8,16 +8,16 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.5.1-dev\n" "Report-Msgid-Bugs-To: translators@phpmyadmin.net\n" "POT-Creation-Date: 2015-10-09 07:21-0400\n" -"PO-Revision-Date: 2015-09-29 22:16+0200\n" +"PO-Revision-Date: 2015-10-12 22:37+0200\n" "Last-Translator: Giovanni Sora \n" -"Language-Team: Interlingua \n" +"Language-Team: Interlingua " +"\n" "Language: ia\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 2.5\n" +"X-Generator: Weblate 2.5-dev\n" #: changelog.php:37 license.php:30 #, php-format @@ -970,10 +970,9 @@ msgid "Do you really want to TRUNCATE the selected partition(s)?" msgstr "Tu vermente vole TRUNCAR le partition(es) seligite?" #: js/messages.php:66 -#, fuzzy #| msgid "Do you really want to execute \"%s\"?" msgid "Do you really want to RESET SLAVE?" -msgstr "Tu es vermente secur que tu vole executar \"%s\"?" +msgstr "Tu es vermente secur que tu vole executar RESET SLAVE?" #: js/messages.php:68 msgid "" From 337697d2e4065da686c65f2453025451b620e3ae Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 12 Oct 2015 17:18:48 -0400 Subject: [PATCH 4/4] ChangeLog entry Signed-off-by: Marc Delisle --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index d8a59950f2..d0bd66a90e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -34,6 +34,7 @@ phpMyAdmin - ChangeLog - issue Fix cookies clearing on version change - issue #11558 Cannot execute SQL with subquery - issue #11520 Incorrect syntax creating a user using mysql_native_password with MariaDB +- issue #11561 Cannot use third party auth plugins 4.5.0.2 (2015-09-25) - issue #11497 Incorrect indexes when exporting