[Validation] Remove session value even if the posted code is valid
This commit is contained in:
parent
5084b61fd9
commit
df7c959f54
@ -38,9 +38,9 @@ class CaptchaValidator implements FormValidatorInterface
|
||||
if (!($code && $excepted_code && is_string($code) && is_string($excepted_code)
|
||||
&& $this->niceize($code) == $this->niceize($excepted_code))) {
|
||||
$form->addError(new FormError('Bad code value'));
|
||||
} else {
|
||||
$this->session->remove($this->key);
|
||||
}
|
||||
|
||||
$this->session->remove($this->key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user