Revision: 43623
Author:   brion
Date:     2008-11-17 18:54:55 +0000 (Mon, 17 Nov 2008)

Log Message:
-----------
* Blacklist redirects via Special:Filepath, hard to use.
Committing Tim's fixes...

Modified Paths:
--------------
    trunk/phase3/RELEASE-NOTES
    trunk/phase3/includes/Title.php

Modified: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES  2008-11-17 18:53:35 UTC (rev 43622)
+++ trunk/phase3/RELEASE-NOTES  2008-11-17 18:54:55 UTC (rev 43623)
@@ -347,6 +347,7 @@
 * 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 ===

Modified: trunk/phase3/includes/Title.php
===================================================================
--- trunk/phase3/includes/Title.php     2008-11-17 18:53:35 UTC (rev 43622)
+++ trunk/phase3/includes/Title.php     2008-11-17 18:54:55 UTC (rev 43623)
@@ -316,9 +316,13 @@
                                        $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;



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to