Fix XSS on error with very long query.
This commit is contained in:

committed by
Michal Čihař

parent
d2e0e09e0d
commit
f273e6cbf6
@@ -575,7 +575,7 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
|
|||||||
$formatted_sql = '';
|
$formatted_sql = '';
|
||||||
} else {
|
} else {
|
||||||
if (strlen($the_query) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
|
if (strlen($the_query) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
|
||||||
$formatted_sql = substr($the_query, 0, $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) . '[...]';
|
$formatted_sql = htmlspecialchars(substr($the_query, 0, $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'])) . '[...]';
|
||||||
} else {
|
} else {
|
||||||
$formatted_sql = PMA_formatSql(PMA_SQP_parse($the_query), $the_query);
|
$formatted_sql = PMA_formatSql(PMA_SQP_parse($the_query), $the_query);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user