Skip to content

Issue with django-recapture v4 and form submit event listeners #348

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

Open
sarahboyce opened this issue Dec 19, 2023 · 3 comments
Open

Issue with django-recapture v4 and form submit event listeners #348

sarahboyce opened this issue Dec 19, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@sarahboyce
Copy link

Describe the bug
Hello 👋 this might not be a bug but maybe documentation is required.

I am trying to update djangoproject.com django-recapture to v4, you can see me trying here: django/djangoproject.com#1450

I am struggling due to this change: #296
Which interferes with our own javascript here: djangoproject/static/js/mod/stripe-donation.js

I now know we were relying on the captcha data to be added to the form on page load, but I'm unable to find a solution to around this as django_recapture is also submitting my form via javascript.

Any thoughts would be really appreciated ❤️

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@sabderemane
Copy link

Hi @Stormheg 😄 I'm tagging you since you follow a bit djangoproject.com and the use of the library 💚

@Stormheg
Copy link
Contributor

Hey, thanks for tagging.

I can see why the event listener added by #296 causes problems. We've made that change so we only fetch a reCAPTCHA response once a form is submitted, effectively stopping the response from ever expiring if the user takes more than two minutes to complete the form.

I'm not entirely sure what we can do to improve the situation. Monday morning & not enough caffeine in my system yet 😅

Suggestions welcome

@zerolab
Copy link

zerolab commented Feb 21, 2024

I just spent more than I want to admit on this.. check if you have a button or submit input named "submit". We had <button type="submit" name="submit">Register</button> 😮‍💨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy