Invalidate captcha after it is used

This commit is contained in:
Frédéric Guillot
2021-06-05 15:03:43 -07:00
committed by fguillot
parent 2455cec7ac
commit 728ba61450

View File

@@ -85,6 +85,9 @@ class PasswordResetValidator extends BaseValidator
if (! $result) {
$errors['captcha'] = array(t('Invalid captcha'));
}
// Invalidate captcha to avoid reuse.
session_remove('captcha');
}
return array($result, $errors);