Page MenuHomePhabricator

wgWhiteListRead is ineffective when set to empty array
Closed, InvalidPublic

Description

Author: costa

Description:
If I set wgWhiteListRead to an empty array, I would expect anonymous users to be
denied access to all pages. However, it looks like it has no effect, and
anonymous users can actually browse all pages. The only way I found this to work
was to put at least one (fake) page on the array. IMHO an empty array should
equals to "deny access to all pages" for anonymous users.


Version: 1.4.x
Severity: normal

Details

Reference
bz1789

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:19 PM
bzimport set Reference to bz1789.
bzimport added a subscriber: Unknown Object (MLST).

You need to define at least an entry front page and the login page, otherwise you've got a
pretty useless site.

magnusrk+wiki wrote:

Well, function userCanRead in Title.php includes a specific check if the requested page is the login page, and if anon users can
register. If yes, it ignores $wgWhitelistRead and allows access to login page. :)

This problem, bug or not, should be gone in 1.5. The check against $wgWhitelistRead in User.php is removed in favor of the new
user/group permissions. Until then, you can either use a dummy page, or edit said line in User.php to use === false rather than empty().
But as brion says, you probably want an entry page so people can access the login page without having it bookmarked.