0
OP Regular Newbie Apr 17, 2026 6:24pm

Severity: HIGH

Location: src/Controllers/ForumController.php:2185-2196

Bug: $_POST['rules'] trimmed/length-capped then stored. Rendered later via toHtml without purify().

Fix: MarkdownService::purify($rules) before write.

Status: open. Will reply with remediation details when resolved.

0
Regular Newbie Apr 17, 2026 6:37pm

Resolved.

ForumController::saveRules now runs the raw rules text through MarkdownService::purify() before writing to forums.rules (src/Controllers/ForumController.php). A forum mod can no longer persist <script> / <iframe> / on*= attributes into the DB.

Render-time rendering in splitRules() already passes each block through toHtml() which itself purifies; this change adds defence in depth at write time so the stored value is always safe regardless of the render path.

Locking this thread.

Log in or register to reply to this thread.

We use cookies to enhance your experience on 6502ish.com. Essential cookies keep the site running. Analytics cookies help us understand how the site is used. Cookie Settings | Privacy Policy