https://bugzilla.wikimedia.org/show_bug.cgi?id=34590
--- Comment #21 from Nicolas Brouard <[email protected]> 2012-03-10 00:07:34 UTC --- Sorry for my late response, I was far from Internet... I have had more time to test your remarks on a standard mediawiki installation with standard wikidb and no special authentication, like CentralAuth or LDAP or whatever, just standard login and password, a Linux box with mysql. And I can certify (and can provide test logins to who want to test the patch) that: - 1 - Special:UserContribution works as I said, it doesn't reveal the Username if you entered an email (it outputs no contribution). - brouard@localhost works. If it did not work, it probably means that you have another username with the same e-mail address and that you did not enter the corresponding password. Currently (and I thank you for this remark) because Username entered with underscores are tested without underscore (I don't understand the reason) an e-mail containing an underscore is not recognized with the current patch (the variable $name has already all underscores replaced by blanks). A solution consists in replacing the blanks in the email address by underscores: $dbr = wfGetDB( DB_SLAVE ); $s = $dbr->selectRow( 'user', array( 'user_id' ), array( 'user_name' => $nt->getText() ), __METHOD__ ); if ( $s === false ) { //Start Patch $result = null; $name_= strtr($name, " ","_"); if( Sanitizer::validateEmail($name_)) { $stwo = $dbr->selectRow( 'user', array( 'user_id' ), array( 'user_email' => $name_ ), __METHOD__ ); if ( $stwo === false ) { $result = null; } else { $result = $stwo->user_id; } } else { $result = null; } //End patch } else { $result = $s->user_id; } I just tested on a few users and it seems to work, even for n_brouard@localhost . Regards, -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
