Reject titles with %XX hex codes (since these have special meaning in URL links and...
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 16 Oct 2004 07:15:18 +0000 (07:15 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 16 Oct 2004 07:15:18 +0000 (07:15 +0000)
includes/Title.php

index ef11553..3924085 100644 (file)
@@ -979,7 +979,7 @@ class Title {
                if ( $imgpre === false ) {
                        $imgpre = ':' . $wgContLang->getNsText( Namespace::getImage() ) . ':';
                        # % is needed as well
-                       $rxTc = '/[^' . Title::legalChars() . ']/';
+                       $rxTc = '/[^' . Title::legalChars() . ']|%[0-9A-Fa-f]{2}/';
                }
 
                $this->mInterwiki = $this->mFragment = '';