From: Niklas Laxström Date: Thu, 15 Nov 2007 16:32:41 +0000 (+0000) Subject: * If restricted read access was enabled, whitelist didn't work with special pages... X-Git-Tag: 1.31.0-rc.0~50859 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=49b0be69a1b87b602204699ff22f7b9514f72fdd;p=lhc%2Fweb%2Fwiklou.git * If restricted read access was enabled, whitelist didn't work with special pages which had spaces in theirs names * If restricted read access was enabled, requests for non-existing special pages threw an exception --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ae75d88115..f06162fefa 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -153,6 +153,10 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN the single IP should not unblock the entire range. * (bug 6695) Fix native language name of Southern Sotho (Sesotho) (st) * Make action=render follow redirects by default +* If restricted read access was enabled, whitelist didn't work with special + pages which had spaces in theirs names +* If restricted read access was enabled, requests for non-existing special pages + threw an exception === API changes in 1.12 === diff --git a/includes/Title.php b/includes/Title.php index 08ff064908..af720eed03 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1321,8 +1321,13 @@ class Title { * and check again */ if( $this->getNamespace() == NS_SPECIAL ) { - $name = $this->getText(); + $name = $this->getDBKey(); list( $name, /* $subpage */) = SpecialPage::resolveAliasWithSubpage( $name ); + if ( $name === false ) { + # Invalid special page, but we show standard login required message + return false; + } + $pure = SpecialPage::getTitleFor( $name )->getPrefixedText(); if( in_array( $pure, $wgWhitelistRead, true ) ) return true;