forked from GNUsocial/gnu-social
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:
parent
4ea35f339d
commit
e74590d414
@ -282,7 +282,11 @@ class RecoverpasswordAction extends Action
|
||||
$user = User::staticGet('email', common_canonical_email($nore));
|
||||
|
||||
if (!$user) {
|
||||
$user = User::staticGet('nickname', common_canonical_nickname($nore));
|
||||
try {
|
||||
$user = User::staticGet('nickname', common_canonical_nickname($nore));
|
||||
} catch (NicknameException $e) {
|
||||
// invalid
|
||||
}
|
||||
}
|
||||
|
||||
# See if it's an unconfirmed email address
|
||||
|
Loading…
Reference in New Issue
Block a user