diff --git a/ChangeLog b/ChangeLog index 75b8078c5..e4ad25ffb 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2004-03-29 Marc Delisle + * server_privileges.php: bug 923171, password error when copying a user + 2004-03-26 Marc Delisle * left.php, db_details_structure.php, config.inc.php, Documentation.html, libraries/common.lib.php, libraries/config_import.lib.php: diff --git a/server_privileges.php b/server_privileges.php index b269c00bf..f855064e3 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -632,7 +632,12 @@ if (!empty($adduser_submit) || !empty($change_copy)) { PMA_DBI_try_query($real_sql_query) or PMA_mysqlDie(PMA_DBI_getError(), $sql_query); $message = $strAddUserMessage; } else { - $queries[] = $sql_query; + $queries[] = $real_sql_query; + // we put the query containing the hidden password in + // $queries_for_display, at the same position occupied + // by the real query in $queries + $tmp_count = count($queries); + $queries_for_display[$tmp_count - 1] = $sql_query; } unset($real_sql_query); PMA_DBI_free_result($res); @@ -853,10 +858,17 @@ if (!empty($delete) || (!empty($change_copy) && $mode < 4)) { * Changes / copies a user, part V */ if (!empty($change_copy)) { + $tmp_count = -1; foreach ($queries as $sql_query) { + $tmp_count++; if ($sql_query{0} != '#') { PMA_DBI_query($sql_query); } + // when there is a query containing a hidden password, take it + // instead of the real query sent + if (isset($queries_for_display[$tmp_count])) { + $queries[$tmp_count] = $queries_for_display[$tmp_count]; + } } $message = $strSuccess; $sql_query = join("\n", $queries);