Robert Vogel has uploaded a new change for review. https://gerrit.wikimedia.org/r/193359
Change subject: Canonical name can not have underscores ...................................................................... Canonical name can not have underscores LdapAuthentication auth plugin in combination with auto-auth feature may create usernames with underscores. Having underscores in database field 'user.user_name' causes several issues within MediaWiki. I. e. recursion warnings in RequestContext.php:320 This fix makes sure the database does not contain any usernames with underscores. Change-Id: Id707f41cad5c28c228656109ee0cd4f6dc4aaef0 --- M LdapAuthentication.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LdapAuthentication refs/changes/59/193359/1 diff --git a/LdapAuthentication.php b/LdapAuthentication.php index 5b258fc..6b53346 100644 --- a/LdapAuthentication.php +++ b/LdapAuthentication.php @@ -1303,6 +1303,9 @@ global $wgMemc; $this->printDebug( "Entering getCanonicalName", NONSENSITIVE ); + + $username = str_replace( '_', ' ', $username ); + if ( User::isIP( $username ) ) { $this->printDebug( "Username is an IP, not munging.", NONSENSITIVE ); return $username; -- To view, visit https://gerrit.wikimedia.org/r/193359 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id707f41cad5c28c228656109ee0cd4f6dc4aaef0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LdapAuthentication Gerrit-Branch: master Gerrit-Owner: Robert Vogel <vo...@hallowelt.biz> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits