Page MenuHomePhabricator
Authored By
MaxSem
Aug 1 2019, 7:14 AM
Size
1 KB
Referenced Files
None
Subscribers
None

T229541.patch

From b35b1f8a87c859e61d8cb854b9930cd68e9e21f6 Mon Sep 17 00:00:00 2001
From: Max Semenik <maxsem.wiki@gmail.com>
Date: Thu, 1 Aug 2019 00:07:50 -0700
Subject: [PATCH] SECURITY: escape edit summaries in feed pages
Sanitizer::stripAllTags() is assumed to return safe HTML even though
it's documented as HTML-unsafe.
Bug: T229541
Change-Id: I0cb918f8148d1782882e104d127f08cbfa23e542
---
includes/specials/MobileSpecialPageFeed.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/includes/specials/MobileSpecialPageFeed.php b/includes/specials/MobileSpecialPageFeed.php
index 25886870c..3891a70a4 100644
--- a/includes/specials/MobileSpecialPageFeed.php
+++ b/includes/specials/MobileSpecialPageFeed.php
@@ -42,7 +42,7 @@ abstract class MobileSpecialPageFeed extends MobileSpecialPage {
} else {
$comment = Linker::formatComment( $comment, $title );
// flatten back to text
- $comment = Sanitizer::stripAllTags( $comment );
+ $comment = htmlspecialchars( Sanitizer::stripAllTags( $comment ) );
}
return $comment;
}
--
2.21.0.windows.1

File Metadata

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

Event Timeline