Page MenuHomePhabricator
Authored By
SomeRandomDeveloper
May 31 2025, 7:56 PM
Size
1 KB
Referenced Files
None
Subscribers
None

01-T395737.patch

From 3bddebfca23f0ec7b4c9371f1447033dd76769df Mon Sep 17 00:00:00 2001
From: SomeRandomDeveloper <thisisnotmyname275@gmail.com>
Date: Sat, 31 May 2025 21:53:53 +0200
Subject: [PATCH] SECURITY: Escape topic display titles
This addresses a stored XSS vulnerability using the mintydocs_topic
parser function.
Bug: T395737
Change-Id: I2f1c471bfca90e83051046e20ee78b75c200a407
---
includes/MintyDocsParserFunctions.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/includes/MintyDocsParserFunctions.php b/includes/MintyDocsParserFunctions.php
index 9025277..068956a 100644
--- a/includes/MintyDocsParserFunctions.php
+++ b/includes/MintyDocsParserFunctions.php
@@ -256,8 +256,8 @@ class MintyDocsParserFunctions {
foreach ( $processedParams as $paramName => $value ) {
if ( $paramName == 'display name' ) {
- $parserOutput->setPageProperty( 'MintyDocsDisplayName', $value );
- $displayTitle = $value;
+ $displayTitle = htmlspecialchars( $value, ENT_QUOTES );
+ $parserOutput->setPageProperty( 'MintyDocsDisplayName', $displayTitle );
} elseif ( $paramName == 'toc name' ) {
$tocDisplayTitle = $value;
} elseif ( $paramName == 'inherit' && $value == null ) {
--
2.49.0

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
20511801
Default Alt Text
01-T395737.patch (1 KB)

Event Timeline