Fix forum XSS

This commit is contained in:
slawkens
2023-11-27 22:56:38 +01:00
parent 98332f1483
commit d1046ba21d
3 changed files with 13 additions and 0 deletions

View File

@@ -47,6 +47,10 @@ if(Forum::canPost($account_logged)) {
$html = (int)($_REQUEST['html'] ?? 0);
$saved = false;
if (!superAdmin()) {
$html = 0;
}
if(isset($_REQUEST['quote'])) {
$quoted_post = $db->query("SELECT `players`.`name`, `" . FORUM_TABLE_PREFIX . "forum`.`post_text`, `" . FORUM_TABLE_PREFIX . "forum`.`post_date` FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`id` = ".(int) $quote)->fetchAll();
if(isset($quoted_post[0]['name'])) {