VOOZH about

URL: https://codeberg.org/sjbr/sr-freecap/issues/3

โ‡ฑ #3 - Wrong captcha - sjbr/sr-freecap - Codeberg.org


You've already forked sr-freecap
6

Wrong captcha #3

Closed
opened by TCHSUPPORT ยท 3 comments
๐Ÿ‘ TCHSUPPORT
Copy link

Dear Team!

Thanks for your wonderful plugin!
On our page it always says "Wrong captcha" We tried multiple times from different devices. Do you have a tip for us, how to solve this?

Thanks

Dear Team! Thanks for your wonderful plugin! On our page it always says "Wrong captcha" We tried multiple times from different devices. Do you have a tip for us, how to solve this? Thanks
๐Ÿ‘ SJBR
Owner
Copy link

This is not a message issued by sr_freecap. Perhaps there is something wrong with the plugin invoking the captcha validation of the sr_freecap extension.

This is not a message issued by sr_freecap. Perhaps there is something wrong with the plugin invoking the captcha validation of the sr_freecap extension.
๐Ÿ‘ vertexvaar
Copy link

I can reproduce this behavior when i remove the fe_user_typo cookie and reload the page that contains the captcha (e.g. when used with femanager 7.0.0 in TYPO3 v11).

The code responsible for that seems to be in the EidDispatcher, which discards the actual response with the cookie and returns a NullResponse instead. It says "Output was already sent" but that isn't true. No output is sent before those lines, just the user's fe_session record is updated, but the cookie that links the session to the browser will never be set.

// Output was already sent
return new NullResponse();

With the fe_typo_user cookie set, the session data for the existing session is properly updated and the captcha works. I think sr_freecap has to create the cookie if not present.

I can reproduce this behavior when i remove the fe_user_typo cookie and reload the page that contains the captcha (e.g. when used with femanager 7.0.0 in TYPO3 v11). The code responsible for that seems to be in the EidDispatcher, which discards the actual response with the cookie and returns a `NullResponse` instead. It says "Output was already sent" but that isn't true. No output is sent before those lines, just the user's fe_session record is updated, but the cookie that links the session to the browser will never be set. https://codeberg.org/sjbr/sr-freecap/src/commit/35de13aa415dc7205c5e04d23528fa1b6831859f/Classes/Http/EidDispatcher.php#L128-L129 With the fe_typo_user cookie set, the session data for the existing session is properly updated and the captcha works. I think sr_freecap has to create the cookie if not present.
๐Ÿ‘ pulponair
Copy link

@sjbr @TCHSUPPORT @vertexvaar
This issue is caused by an inproper response beeing returned in the middleware which prevents TYPO3 from setting the fe_user_cookie.

There is fix at the in2code (thank you guys) repository:
https://github.com/in2code-de/sr-freecap/tree/bugfix/wrong-captcha

Side note:
The whole custom eID Dispatcher/Middelware seems a little weird and superfluous to me.
You might want to considere using something more "default". No bad feelings though :)

@sjbr @TCHSUPPORT @vertexvaar This issue is caused by an inproper response beeing returned in the middleware which prevents TYPO3 from setting the fe_user_cookie. There is fix at the in2code (thank you guys) repository: https://github.com/in2code-de/sr-freecap/tree/bugfix/wrong-captcha Side note: The whole custom eID Dispatcher/Middelware seems a little weird and superfluous to me. You might want to considere using something more "default". No bad feelings though :)
๐Ÿ‘ SJBR
sjbr closed this issue
Sign in to join this conversation.
No Branch/Tag specified
Labels
Clear labels
No items
No labels
Clear milestone
No items
No milestone
Clear projects
No items
No project
Clear assignees
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sjbr/sr-freecap#3
Reference in a new issue
No description provided.
Delete branch "%!s(

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?