Created
January 8, 2020 02:33
-
-
Save ibennetch/4c1b701f4b766e4dd5556e8e26200b6b to your computer and use it in GitHub Desktop.
PMASA-2020-1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php | |
index 86c46ef6f7..1bf7b6e07b 100644 | |
--- a/libraries/server_privileges.lib.php | |
+++ b/libraries/server_privileges.lib.php | |
@@ -2448,7 +2448,7 @@ function PMA_getExtraDataForAjaxBehavior( | |
if (isset($_REQUEST['validate_username'])) { | |
$sql_query = "SELECT * FROM `mysql`.`user` WHERE `User` = '" | |
- . $_REQUEST['username'] . "';"; | |
+ . PMA_Util::sqlAddSlashes($_REQUEST['username']) . "';"; | |
$res = $GLOBALS['dbi']->query($sql_query); | |
$row = $GLOBALS['dbi']->fetchRow($res); | |
if (empty($row)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php | |
index 86c46ef6f7..1bf7b6e07b 100644 | |
--- a/libraries/server_privileges.lib.php | |
+++ b/libraries/server_privileges.lib.php | |
@@ -2448,7 +2448,7 @@ function PMA_getExtraDataForAjaxBehavior( | |
if (isset($_REQUEST['validate_username'])) { | |
$sql_query = "SELECT * FROM `mysql`.`user` WHERE `User` = '" | |
- . $_REQUEST['username'] . "';"; | |
+ . $GLOBALS['dbi']->escapeString($_REQUEST['username']) . "';"; | |
$res = $GLOBALS['dbi']->query($sql_query); | |
$row = $GLOBALS['dbi']->fetchRow($res); | |
if (empty($row)) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment