r90221 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90220‎ | r90221 | r90222 >
Date:18:49, 16 June 2011
Author:brion
Status:ok (Comments)
Tags:
Comment:
* (bug 29424) Fix for underscore form and other non-normalized usernames on Special:GlobalUserRights (CentralAuth version)

Names weren't being validated at all before being sent off to CentralAuthUser, which itself doesn't seem to do any validation.
Running through User::getCanonicalName() to clean it up, same as is used for User::newFromName().
Modified paths:
  • /trunk/extensions/CentralAuth/CentralAuthGroupMembershipProxy.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/CentralAuthGroupMembershipProxy.php
@@ -19,6 +19,7 @@
2020 }
2121
2222 public static function newFromName( $name ) {
 23+ $name = User::getCanonicalName( $name );
2324 $globalUser = new CentralAuthUser( $name );
2425 return $globalUser->exists() ? new CentralAuthGroupMembershipProxy( $globalUser ) : null;
2526 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r92258MFT r90221, r90723, r91145reedy17:49, 15 July 2011
r92270MFT r91145, r90221 to 1.17wmf1 and REL1.18reedy18:33, 15 July 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   18:51, 16 June 2011

Quick fix needs backport to 1.17 & 1.18 & for deployment.

Status & tagging log