You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have confirmed that this is a bug and not a configuration/user error.
I have searched for existing issues and confirmed that my issue has not been reported before.
IconCaptcha version
4.0.3
PHP version
8.0
Browsers affected
Google Chrome
Expectation
When we click on an image, the backend should not retrieve an error 500.
Actual behaviour
The backend crashes on a division by zero after a click on an image. I suppose count($this->session->icons) should never be 0.
Implementation was done using tutorial steps, except that the domain of the backend is different from the frontend.
It appears that the session id returned in the first captcha load response header is not used for the verification request; so the session is simply not working.
The problem is that the first php session id is only returned through the first call via XHR.
Thus the browser does not use it as main session cookies for the next XHR.
A very good solution would be a hook to retrieve the php session id from the load call, and an option to set the session id to use for the next calls.
Additional information
No response
The text was updated successfully, but these errors were encountered:
It seems like we are running into the same issue on our production environment.
It would also help in the meanwhile if it was a catchable exception and not a fatal error, so we can at least handle the error gracefully.
Bug report requirements
IconCaptcha version
4.0.3
PHP version
8.0
Browsers affected
Google Chrome
Expectation
When we click on an image, the backend should not retrieve an error 500.
Actual behaviour
The backend crashes on a division by zero after a click on an image. I suppose count($this->session->icons) should never be 0.
Implementation was done using tutorial steps, except that the domain of the backend is different from the frontend.
Here is the trace :
Array
(
[0] => Array
(
[file] => vendor/fabianwennink/iconcaptcha/src/Challenge/Challenge.php
[line] => 232
[function] => determineClickedIcon
[class] => IconCaptcha\Challenge\Challenge
[type] => ->
)
Relevant log information
It appears that the session id returned in the first captcha load response header is not used for the verification request; so the session is simply not working.
The problem is that the first php session id is only returned through the first call via XHR.
Thus the browser does not use it as main session cookies for the next XHR.
A very good solution would be a hook to retrieve the php session id from the load call, and an option to set the session id to use for the next calls.
Additional information
No response
The text was updated successfully, but these errors were encountered: