From 4d2950eb6b31d7dd12388ef21478578d25e9d4ae Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 17 Nov 2008 18:54:55 +0000 Subject: [PATCH] * Blacklist redirects via Special:Filepath, hard to use. Committing Tim's fixes... --- RELEASE-NOTES | 1 + includes/Title.php | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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; -- 2.20.1