* Blacklist redirects via Special:Filepath, hard to use.
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 17 Nov 2008 18:54:55 +0000 (18:54 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 17 Nov 2008 18:54:55 +0000 (18:54 +0000)
Committing Tim's fixes...

RELEASE-NOTES
includes/Title.php

index b9cc0cc..7faba68 100644 (file)
@@ -347,6 +347,7 @@ The following extensions are migrated into MediaWiki 1.14:
 * Safer handling of non-MediaWiki exceptions -- now obeys our settings for
   formatting and path exposure.
 * Less verbose errors from profileinfo.php when not configured
+* Blacklist redirects via Special:Filepath, hard to use.
 
 
 === API changes in 1.14 ===
index 9bdfb82..9be7ace 100644 (file)
@@ -316,9 +316,13 @@ class Title {
                                        $m[1] = urldecode( ltrim( $m[1], ':' ) );
                                }
                                $title = Title::newFromText( $m[1] );
-                               // Redirects to Special:Userlogout are not permitted
-                               if( $title instanceof Title && !$title->isSpecial( 'Userlogout' ) )
+                               // Redirects to some special pages are not permitted
+                               if( $title instanceof Title 
+                                               && !$title->isSpecial( 'Userlogout' )
+                                               && !$title->isSpecial( 'Filepath' ) ) 
+                               {
                                        return $title;
+                               }
                        }
                }
                return null;