Ticket #3076: fix regression in password recovery when email address given that doesn't match

Was triggering errors due to use of common_canonical_nickname() on arbitrary input without checking for exceptions about invalid nicknames (which didn't exist long ago in the before time)
This commit is contained in:
Brion Vibber 2011-03-09 15:46:24 -08:00
parent 316fd01e20
commit 4d5f8e7876

View File

@ -282,7 +282,11 @@ class RecoverpasswordAction extends Action
$user = User::staticGet('email', common_canonical_email($nore));
if (!$user) {
try {
$user = User::staticGet('nickname', common_canonical_nickname($nore));
} catch (NicknameException $e) {
// invalid
}
}
# See if it's an unconfirmed email address