Skip to content
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

failed to connect to recaptcha service #19123

Open
xboxfly15 opened this issue Apr 21, 2024 · 0 comments
Open

failed to connect to recaptcha service #19123

xboxfly15 opened this issue Apr 21, 2024 · 0 comments

Comments

@xboxfly15
Copy link

xboxfly15 commented Apr 21, 2024

Hi, I've been trying to setup reCaptcha v2 invisible and I been getting "Failed to connect to reCAPTCHA service!".
Turns out it was an "invalid-json" error and I narrowed it down to this line

new ReCaptcha\RequestMethod\CurlPost(null, $captchaSiteVerifyURL),

I changed this line to new ReCaptcha\RequestMethod\CurlPost() and changed line 260 from $resp = $reCaptcha->verify( to $resp = $reCaptcha->setExpectedHostname($captchaSiteVerifyURL)->verify( as specified in https://github.com/google/recaptcha/tree/master?tab=readme-ov-file#usage

This has solved my issue and I can now login.
I am using the latest PHPMyAdmin docker image so I'm having to do some hacky stuff to modify the AuthenticationCookie.php in my Docker image that I would MUCH rather prefer I didn't have to do.

So I am asking you to make this same change in PHPMyAdmin so upon the next version release I don't have to do any hacky stuff and it just works! I am also documenting this here for anyone else who may have the same problem.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant