Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F9524211
T175900.patch
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Bawolff
Sep 14 2017, 9:47 AM
2017-09-14 09:47:47 (UTC+0)
Size
944 B
Referenced Files
None
Subscribers
None
T175900.patch
View Options
From 454857133394a70a0f591dd2347e25cea3ae60e5 Mon Sep 17 00:00:00 2001
From: Brian Wolff <bawolff+wn@gmail.com>
Date: Thu, 14 Sep 2017 09:45:39 +0000
Subject: [PATCH] Fix XSS in Special:BannerLoader error handling.
Bug: T175900
Change-Id: Ic99467ff077e2169141d5a5200c6d32ca10b1234
---
special/SpecialBannerLoader.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/special/SpecialBannerLoader.php b/special/SpecialBannerLoader.php
index 7c5b34c..4a7ef04 100644
--- a/special/SpecialBannerLoader.php
+++ b/special/SpecialBannerLoader.php
@@ -38,7 +38,7 @@ class SpecialBannerLoader extends UnlistedSpecialPage {
} catch ( Exception $e ) {
$msg = $e->getMessage();
- $msgParamStr = $msg ? " '{$msg}' " : '';
+ $msgParamStr = $msg ? Xml::encodeJsVar( $msg ) : '';
$out = "mw.centralNotice.handleBannerLoaderError({$msgParamStr});";
$cacheResponse = self::MAX_CACHE_REDUCED;
--
1.9.5 (Apple Git-50.3)
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4932063
Default Alt Text
T175900.patch (944 B)
Attached To
Mode
T175900: XSS in central notice due to lack of escaping in LoadBanner error handling
Attached
Detach File
Event Timeline
Log In to Comment