Skip to content

Commit

Permalink
bug #4158 Events page says no privileges with ALL PRIVILEGES
Browse files Browse the repository at this point in the history
  • Loading branch information
lem9 committed Nov 27, 2013
1 parent 9758703 commit b22b76e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -9,6 +9,7 @@ phpMyAdmin - ChangeLog
- bug #4075 Support A10 Networks load balancer
- bug #4083 row deleting isn't binlogs friendly
- bug #4163 Setup script does not recognize manually-configured server
- bug #4158 Events page says no privileges with ALL PRIVILEGES

4.0.9.0 (2013-11-04)
- bug #4104 Can't edit updatable view when searching
Expand Down
10 changes: 9 additions & 1 deletion libraries/Util.class.php
Expand Up @@ -3926,7 +3926,15 @@ public static function currentUserHasPrivilege($priv, $db = null, $tbl = null)
if ($db !== null) {
// need to escape wildcards in db and table names, see bug #3518484
$db = str_replace(array('%', '_'), array('\%', '\_'), $db);
$query .= " AND TABLE_SCHEMA='%s'";
/*
* This is to take into account a wildcard db privilege
* so we replace % by .* and _ by . to be able to compare
* with REGEXP.
*
* Also, we need to double the inner % to please sprintf().
*/
$query .= " AND '%s' REGEXP"
. " REPLACE(REPLACE(TABLE_SCHEMA, '_', '.'), '%%', '.*')";
$schema_privileges = PMA_DBI_fetch_value(
sprintf(
$query,
Expand Down

0 comments on commit b22b76e

Please sign in to comment.