Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F29930291
T229541.patch
MaxSem (Max Semenik)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
MaxSem
Aug 1 2019, 7:14 AM
2019-08-01 07:14:25 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
T229541.patch
View Options
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
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7806078
Default Alt Text
T229541.patch (1 KB)
Attached To
Mode
T229541: Javascript injection in edit summary on mobile site (CVE-2019-14807)
Attached
Detach File
Event Timeline
Log In to Comment