jenkins-bot has submitted this change and it was merged.
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(-)
Approvals:
Reedy: Looks good to me, approved
jenkins-bot: Verified
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: merged
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]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits