diff options
author | Alexander M. Turek <me@derrabus.de> | 2004-06-26 00:16:04 +0400 |
---|---|---|
committer | Alexander M. Turek <me@derrabus.de> | 2004-06-26 00:16:04 +0400 |
commit | bb12e03b3a276770ee6d8679bf80468c8cbe3d2b (patch) | |
tree | 353eac58831ea30b22b9d590a219bf392a1ebed2 | |
parent | 07833568ea64c6f2439949a29bab533c4b379dc6 (diff) |
bug #979596
-rwxr-xr-x | ChangeLog | 2 | ||||
-rw-r--r-- | server_privileges.php | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -19,6 +19,8 @@ $Source$ 2004-06-25 Alexander M. Turek <rabus@users.sourceforge.net> * queryframe.php: Undefined index errors. * footer.inc.php: bug #979610. + * server_privileges.php: bug #979596 (granting privileges doesn't take + wildcards in account). 2004-06-24 Marc Delisle <lem9@users.sourceforge.net> * left.php, config.inc.php, Documentation.html, diff --git a/server_privileges.php b/server_privileges.php index 247aee5b41..2bf98c388c 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -1172,7 +1172,7 @@ if (empty($adduser) && empty($checkprivs)) { $res = PMA_DBI_query('SHOW DATABASES;'); $pred_db_array = array(); while ($row = PMA_DBI_fetch_row($res)) { - if (!isset($found_rows) || !in_array($row[0], $found_rows)) { + if (!isset($found_rows) || !in_array(str_replace('_', '\\_', $row[0]), $found_rows)) { $pred_db_array[] = $row[0]; } } @@ -1183,7 +1183,7 @@ if (empty($adduser) && empty($checkprivs)) { echo ' <select name="pred_dbname" onchange="this.form.submit();">' . "\n" . ' <option value="" selected="selected">' . $strUseTextField . ':</option>' . "\n"; foreach ($pred_db_array as $current_db) { - echo ' <option value="' . htmlspecialchars($current_db) . '">' . htmlspecialchars($current_db) . '</option>' . "\n"; + echo ' <option value="' . htmlspecialchars(str_replace('_', '\\_', $current_db)) . '">' . htmlspecialchars($current_db) . '</option>' . "\n"; } echo ' </select>' . "\n"; } |