Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-17367

"data-prevent-flood" ajax causes posting submit to stop when using ReCaptcha V3

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 3.3.12
    • None
    • PHP: 8.1.27
      DB: MySQL(i) 8.0.28-0ubuntu0.20.04.3

      Noticed in v3.3.12.  When posting a forum post and using ReCaptcha V3, with CAPTCHA+ extension, the form submit stops.  It looks like ReCaptcha V3 may fire the data-prevent-flood ajax function from prosilver/template/ajax.js (line 341) a second time.  It's good on the first fire, but then on the second fire, the submit is stopped by ...

      event.preventDefault();

      causing the post to not submit.

      This does not seem to happen with the Simple Image captcha for example.

      My workaround was to first make a child style of prosilver. (Though if a fix could be applied direct to prosilver long term, that would be great)

      in /prosilver-child/template/ajax.js , I made the following changes....

       

      Add line 347:

      $submitButton
      .hide(); // Hide submitbutton to not be manually submit again

       

      Comment out what's now line 357:

      // event.preventDefault(); // remove to not stop ReCaptcha V3 submit


       

      Add line 362:

      $submitButton
      .show(); // Re-enable after 5 seconds

       

      There's probably a better fix that works better with the idea behind "data-prevent-flood" but this seems to be working for me.

       

      Thanks!

            Marc Marc
            kylesands kylesands
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: