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

Switch endpoint to api/siteverify and json response #387

Open
gehaxelt opened this issue Mar 4, 2015 · 0 comments
Open

Switch endpoint to api/siteverify and json response #387

gehaxelt opened this issue Mar 4, 2015 · 0 comments

Comments

@gehaxelt
Copy link

gehaxelt commented Mar 4, 2015

Hi,

I recently had an issue that the bundle wasn't able to validate the captchas. It seemed like the limit of allowed requests to /verify was exhausted thus always returning false.

Having a look at the current backend-validation documention by google (https://developers.google.com/recaptcha/docs/verify), I'd recommend to switch to the following endpoint: https://www.google.com/recaptcha/api/siteverify.

However, this particular endpoint returns a JSON response. Afaik, the current code can't handle JSON responses as it splits the response into seperate lines and compares the first line against true.

Are others having a similar issue?

Fixing this shouldn't be too hard. You could try to parse the JSON response. In case that fails, fallback to the current (line-splitting) validation. Probably changing the default settings to use the newer endpoint is a good idea.

Kind regards,
gehaxelt

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