Page MenuHomePhabricator

$wgAuth->getCanonicalName() is evil and should die in a fire
Closed, ResolvedPublic

Description

$wgAuth->getCanonicalName() is meant to allow authentication plugins to munge a user name from the login name to a mediawiki name. Unfortunately, getCanonicalName is also used for a million other things, like page titles, and checking the validity of user names.

Overloading this function for munging names in auth plugins and for checking validity of usernames and page titles causes an incredible number of bugs. We really need some better method of handling this.


Version: 1.21.x
Severity: normal

Details

Reference
bz40024

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:06 AM
bzimport set Reference to bz40024.
bzimport added a subscriber: Unknown Object (MLST).

AuthManager (T91699) replaces AuthPlugin and deprecates this functionality.

Tgr claimed this task.

AuthManager providers can resolve login name to username in arbitrary ways; that functionality is not used or exposed outside the authentication logic.