bug 923171 password error when copying a user

This commit is contained in:
Marc Delisle
2004-03-29 17:53:23 +00:00
parent d43bda9224
commit ea070d828d
2 changed files with 16 additions and 1 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$
$Source$
2004-03-29 Marc Delisle <lem9@users.sourceforge.net>
* server_privileges.php: bug 923171, password error when copying a user
2004-03-26 Marc Delisle <lem9@users.sourceforge.net>
* left.php, db_details_structure.php, config.inc.php, Documentation.html,
libraries/common.lib.php, libraries/config_import.lib.php:

View File

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