Normalize nickname case on login; fixes failed logins where people were typing MixedCase nicknames (if browser saved this form, it would never work again until clearing the saved form data; very icky.)

This commit is contained in:
Brion Vibber 2010-02-25 11:53:39 -08:00
parent 84fa3776e2
commit a8d0c8d8ef
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ function common_check_user($nickname, $password)
$authenticatedUser = false;
if (Event::handle('StartCheckPassword', array($nickname, $password, &$authenticatedUser))) {
$user = User::staticGet('nickname', $nickname);
$user = User::staticGet('nickname', common_canonical_nickname($nickname));
if (!empty($user)) {
if (!empty($password)) { // never allow login with blank password
if (0 == strcmp(common_munge_password($password, $user->id),