rejecting "." and ".." -- conflict with directories when rewrite rules are used
authorTim Starling <tstarling@users.mediawiki.org>
Tue, 24 Feb 2004 00:09:03 +0000 (00:09 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Tue, 24 Feb 2004 00:09:03 +0000 (00:09 +0000)
includes/Title.php

index 926cc28..fc846b9 100644 (file)
@@ -480,6 +480,11 @@ class Title {
                if( preg_match( $rxTc, $r ) ) {
                        return false;
                }
+               
+               # "." and ".." conflict with the directories of those names
+               if ( $r === "." || $r === ".." ) {
+                       return false;
+               }
 
                if( $this->mInterwiki == "") $t = $wgLang->ucfirst( $r );
                $this->mDbkeyform = $t;