Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2535324
T111029-2.patch
Grunny (Grunny)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Grunny
Sep 3 2015, 5:27 AM
2015-09-03 05:27:53 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
T111029-2.patch
View Options
From 3ab96bfcba9f3f4db75bdc1063d9d95b9c3ac232 Mon Sep 17 00:00:00 2001
From: grunny <mwgrunny@gmail.com>
Date: Tue, 1 Sep 2015 20:26:50 +1000
Subject: [PATCH] SECURITY: Encode history URL in review toolbar
Encode history URL in review toolbar and HTML escape for good measure.
Bug: T111029
---
modules/ext.pageTriage.views.toolbar/ext.pageTriage.articleInfo.html | 2 +-
modules/ext.pageTriage.views.toolbar/ext.pageTriage.articleInfo.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/ext.pageTriage.views.toolbar/ext.pageTriage.articleInfo.html b/modules/ext.pageTriage.views.toolbar/ext.pageTriage.articleInfo.html
index 9a57fd4..091cecb 100644
--- a/modules/ext.pageTriage.views.toolbar/ext.pageTriage.articleInfo.html
+++ b/modules/ext.pageTriage.views.toolbar/ext.pageTriage.articleInfo.html
@@ -52,7 +52,7 @@
<%= mw.msg( 'pagetriage-info-history-header' ) %>
<span class="mwe-pt-info-header-details">
<%= mw.msg( 'pagetriage-edits', rev_count ) %> ·
- <a href="<%= history_link %>"><%= mw.msg( 'pagetriage-info-history-show-full' ) %></a>
+ <a href="<%= mw.html.escape( history_link ) %>"><%= mw.message( 'pagetriage-info-history-show-full' ).escaped() %></a>
</span>
</div>
<div class="mwe-pt-info-content" id="mwe-pt-info-history-container"></div>
diff --git a/modules/ext.pageTriage.views.toolbar/ext.pageTriage.articleInfo.js b/modules/ext.pageTriage.views.toolbar/ext.pageTriage.articleInfo.js
index 03e8b23..fc62d17 100644
--- a/modules/ext.pageTriage.views.toolbar/ext.pageTriage.articleInfo.js
+++ b/modules/ext.pageTriage.views.toolbar/ext.pageTriage.articleInfo.js
@@ -20,7 +20,7 @@ $( function() {
this.model.set(
'history_link',
this.model.buildLink(
- mw.config.get( 'wgArticlePath' ).replace( '$1', mw.config.get( 'wgPageName' ) ),
+ mw.util.getUrl( mw.config.get( 'wgPageName' ) ),
'action=history'
)
);
--
1.9.1
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2549226
Default Alt Text
T111029-2.patch (1 KB)
Attached To
Mode
T111029: XSS possible in PageTriage toolbar
Attached
Detach File
Event Timeline
Log In to Comment