-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setExpirationHops() bug #1
Comments
i patched the getSession function with
I am not sure, if this is a best practice, or the right place to fix this. but it is working on my case. i could create a pull request for this one. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The bug can recur very easily.
In generate stage I set expirationHops to 1. Validation stage can be executed many times and will always output bool(true).
I dive into the code and find the cause.
In class Zend\Captcha\AbstractWord (line 253)
In validation stage "$this->session->setExpirationHops(1, null);" will reset expirationHops. But expirationHops will not take effect in the same request. So after isValid() hops will always be 1.
Originally posted by @ares333 at zendframework/zend-captcha#37
The text was updated successfully, but these errors were encountered: