From e52d9e486f5bf1dea867f59287f70aef3d538189 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sat, 31 Jan 2026 11:34:24 +0100 Subject: [PATCH] Fix XSS in forum board name --- system/pages/forum/new_thread.php | 2 +- system/pages/forum/show_board.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/pages/forum/new_thread.php b/system/pages/forum/new_thread.php index 4f311977..2ed6fe81 100644 --- a/system/pages/forum/new_thread.php +++ b/system/pages/forum/new_thread.php @@ -34,7 +34,7 @@ if(Forum::canPost($account_logged)) { $players_from_account = $db->query('SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = '.(int) $account_logged->getId())->fetchAll(); $section_id = $_REQUEST['section_id'] ?? null; if($section_id !== null) { - echo 'Boards >> ' . $sections[$section_id]['name'] . ' >> Post new thread
'; + echo 'Boards >> ' . escapeHtml($sections[$section_id]['name']) . ' >> Post new thread
'; if(isset($sections[$section_id]['name']) && Forum::hasAccess($section_id)) { if ($sections[$section_id]['closed'] && !Forum::isModerator()) diff --git a/system/pages/forum/show_board.php b/system/pages/forum/show_board.php index e899cc99..26b7b9d6 100644 --- a/system/pages/forum/show_board.php +++ b/system/pages/forum/show_board.php @@ -42,7 +42,7 @@ for($i = 0; $i < $threads_count['threads_count'] / setting('core.forum_threads_p $links_to_pages .= ''.($i + 1).' '; } -echo 'Boards >> '.$sections[$section_id]['name'].''; +echo 'Boards >> '.escapeHtml($sections[$section_id]['name']).''; if($logged && (!$sections[$section_id]['closed'] || Forum::isModerator())) { echo '