Reedy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/64617


Change subject: SECURITY: fix URI escaping when displaying 404
......................................................................

SECURITY: fix URI escaping when displaying 404

In one code path, the URI is passed without escaping into the 404
message.

bug: 48380
Change-Id: I561714be48da83e4252beaad03b27e32ce83cf7f
---
M w/404.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/17/64617/1

diff --git a/w/404.php b/w/404.php
index 5abf5c6..53d95bb 100644
--- a/w/404.php
+++ b/w/404.php
@@ -24,7 +24,7 @@
     preg_match( "|^/upload/(.*)|i",$loc, $matches ) || 
preg_match("|^/style/(.*)|i",$loc, $matches ) ||
     preg_match( "|^/wiki/(.*)|i",$loc, $matches ) || 
preg_match("|^/w/(.*)|i",$loc, $matches ) ||
     preg_match( "|^/extensions/(.*)|i",$loc, $matches ) ) {
-       $title = $matches[1];
+       $title = htmlspecialchars( $matches[1] );
        $details = "<p style=\"font-weight: bold;\">To check for \"$title\" on 
Wikipedia, see: 
                 <a href=\"//en.wikipedia.org/wiki/$title\" 
title=\"Wikipedia:$title\">
                 //en.wikipedia.org/wiki/$title</a></p>";

-- 
To view, visit https://gerrit.wikimedia.org/r/64617
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I561714be48da83e4252beaad03b27e32ce83cf7f
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: CSteipp <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to