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

Captcha doesn't load if endpoint URL already contains get parameters #2

Open
fnicollet opened this issue Sep 18, 2022 · 0 comments · May be fixed by #3
Open

Captcha doesn't load if endpoint URL already contains get parameters #2

fnicollet opened this issue Sep 18, 2022 · 0 comments · May be fixed by #3

Comments

@fnicollet
Copy link

Hello,

If the captchaEndpoint variable already has GET parameters (which is the case for all Wordpress website for example, ajax calls have a "?action=xxx" parameter), the endpoint gets concatenated with "?get=" here:
https://github.com/captcha-com/jquery-captcha/blob/master/src/jquery-captcha.js#L99

Because there are two "?" in the URL, it becomes invalid (returns a HTTP 400 bad request). Other queries use "$.ajax", which checks the presence of a "?" in the URL

fnicollet added a commit to fnicollet/jquery-captcha that referenced this issue Sep 18, 2022
@fnicollet fnicollet linked a pull request Sep 18, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant