Page MenuHomePhabricator

Lowercase logins causes MediaWiki to crash on CapitalLinks set to false
Closed, ResolvedPublic

Description

Author: svippy

Description:
Usernames start with a capital letter (in accordance with the regular MediaWiki scheme). And MediaWiki should handle making the first letter a capital letter, even if the user tries to log in in entirely lowercase.

E.g. Logging in as 'svip' would change it to 'Svip'.

But for some reason, this does not accord if $wgCapitalLinks is set to false on the newest revision of MediaWiki. Instead, such an attempt produces the following error:

Fatal error: Call to a member function getName() on a non-object /includes/specials/SpecialUserlogin.php on line 441

To avoid the error, simply logging in the correct case fixes the issue. I assume this bug is trivial, but critical regardless.


Version: 1.16.x
Severity: critical

Details

Reference
bz21369

Event Timeline

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

skizzerz wrote:

The fix would be to add NS_USER to the MWNamespace::alwaysCaptializedNamespaces array (in /includes/Namespace.php), but I do not know if there are any current users with lowercase names that would not be able to log in after this change, hence why I am mentioning it here instead of committing it.

(In reply to comment #1)

but I do not know if there are any current
users with lowercase names that would not be able to log in after this change,

They're not able to log in now, either, and I don't think they ever were.