From: Brion Vibber Date: Mon, 17 Nov 2008 18:54:55 +0000 (+0000) Subject: * Blacklist redirects via Special:Filepath, hard to use. X-Git-Tag: 1.31.0-rc.0~44311 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=4d2950eb6b31d7dd12388ef21478578d25e9d4ae;p=lhc%2Fweb%2Fwiklou.git * Blacklist redirects via Special:Filepath, hard to use. Committing Tim's fixes... --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b9cc0cc04a..7faba68fca 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/Title.php b/includes/Title.php index 9bdfb82fcf..9be7ace8e6 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -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;