Closed (fixed)
Project:
reCAPTCHA
Version:
8.x-2.x-dev
Component:
General
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2017 at 16:56 UTC
Updated:
18 Aug 2018 at 20:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
hass commentedSounds like a duplicate of #2599804: class Drupal7Post receives "Network is unreachable". Let me know if not.
There may be a network / firewall / php config problem and/or your server cannot run external http requests.
Comment #3
jim_at_miramontes commentedThanks, @hass, but that's not what's going on. My network and server is fine; the problem is simply that the Google API is returning an error -- "timeout-or-duplicate" -- that is not expected or handled by the Drupal code in recaptcha_captcha_validation(), at around line 158:
All that's needed -- I think -- is to add another entry in $error_codes for 'timeout-or-duplicate'. It seems like an easy fix, but I though I'd leave it to the module maintainers to figure out what they wanted to use for the message translation, and to make sure that I wasn't missing anything else in the module.
ps: I think what was causing the message in the first place was a spider or spammer hitting the page containing the captcha and never following up (hence the "timeout" aspect of the message), but that's kinda neither here nor there...
Comment #4
hass commentedWhere is this module validating twice?
Have you customized the module or used any uncommitted patch? This response is nodumented at https://developers.google.com/recaptcha/docs/verify. How can I reproduce this?
Comment #5
markwittens commentedI have the same problem. The validation runs twice or even more times so the form can never be submitted because validation always fails after the first (successful) validation. I attached a patch that fixes the symptoms by only validating once per request, this works for me but for the long term it would probably be better if the source of the problem is found.
Comment #6
hass commentedFixed in both D7 and D8: