Issue phpmyadmin-security/267 SQL injection in Designer feature
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
parent
e172aa7548
commit
469934cf7d
@ -200,7 +200,8 @@ class Designer
|
||||
. Util::backquote($cfgRelation['db']) . '.'
|
||||
. Util::backquote($cfgRelation['designer_settings'])
|
||||
. ' WHERE ' . Util::backquote('username') . ' = "'
|
||||
. $GLOBALS['cfg']['Server']['user'] . '";';
|
||||
. $GLOBALS['dbi']->escapeString($GLOBALS['cfg']['Server']['user'])
|
||||
. '";';
|
||||
|
||||
$result = $GLOBALS['dbi']->fetchSingleRow($query);
|
||||
|
||||
|
||||
@ -787,8 +787,8 @@ class Common
|
||||
. Util::backquote($cfgDesigner['db'])
|
||||
. "." . Util::backquote($cfgDesigner['table'])
|
||||
. " (username, settings_data)"
|
||||
. " VALUES('" . $cfgDesigner['user'] . "',"
|
||||
. " '" . json_encode($save_data) . "');";
|
||||
. " VALUES('" . $GLOBALS['dbi']->escapeString($cfgDesigner['user'])
|
||||
. "', '" . json_encode($save_data) . "');";
|
||||
|
||||
$success = $this->relation->queryAsControlUser($query);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user