]> git.joonet.de Git - adminer.git/commitdiff
Database name is LIKE pattern
authorJakub Vrana <jakub@vrana.cz>
Thu, 4 Aug 2011 11:54:08 +0000 (13:54 +0200)
committerJakub Vrana <jakub@vrana.cz>
Fri, 5 Aug 2011 08:42:11 +0000 (10:42 +0200)
adminer/user.inc.php

index 4cabe8f7ff75e3d6156b9160d36c7081c5b2aee4..78e5674b0dd5d02a553384a99230f3a2cd764309 100644 (file)
@@ -111,7 +111,7 @@ if ($_POST) {
        if ($old_pass != "") {
                $row["hashed"] = true;
        }
-       $grants[DB != "" && !isset($_GET["host"]) ? idf_escape($_GET["db"]) . ".*" : ""] = array();
+       $grants[DB != "" && !isset($_GET["host"]) ? idf_escape(addcslashes(DB, "%_")) . ".*" : ""] = array();
 }
 
 ?>