Reedy has uploaded a new change for review.

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

Change subject: Use / for regex delimiting
......................................................................

Use / for regex delimiting

Change-Id: Ice5d757ca5ccf11cc621c0024984d93ec76c00a2
---
M w/404.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/w/404.php b/w/404.php
index b5e0e14..5922274 100644
--- a/w/404.php
+++ b/w/404.php
@@ -12,8 +12,8 @@
 $encUrl = htmlspecialchars( $prot . $serv . $loc );
 header( "Cache-Control: s-maxage=2678400, max-age=2678400");
 header( "X-Wikimedia-Debug: prot=$prot serv=$serv loc=$loc");
-if( preg_match( "|(%2f)|i", $loc, $matches )
-       || preg_match( "|^/(?:upload|style|wiki|w|extensions)/(.*)|i", $loc, 
$matches )
+if( preg_match( "/(%2f)/i", $loc, $matches )
+       || preg_match( "/^\/(?:upload|style|wiki|w|extensions)\/(.*)/i", $loc, 
$matches )
 ) {
        $title = htmlspecialchars( $matches[1] );
        $details = "<p style=\"font-weight: bold;\">To check for \"$title\" 
see: <a href=\"//$serv/wiki/$title\" 
title=\"$title\">$prot$serv/wiki/$title</a></p>";

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

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

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

Reply via email to