Escape database name in SQL query

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2016-07-19 09:20:15 +02:00
parent ff9291964c
commit 0fad7290c9

View File

@ -2384,7 +2384,7 @@ function PMA_getListOfPrivilegesAndComparedPrivileges()
*/
function PMA_getHtmlTableBodyForSpecificDbRoutinePrivs($db, $odd_row, $index_checkbox)
{
$sql_query = 'SELECT * FROM `mysql`.`procs_priv` WHERE Db = "' . $db . '";';
$sql_query = 'SELECT * FROM `mysql`.`procs_priv` WHERE Db = "' . Util::sqlAddSlashes($db) . '";';
$res = $GLOBALS['dbi']->query($sql_query);
$html_output = '';
while ($row = $GLOBALS['dbi']->fetchAssoc($res)) {