ReCaptcha V3 — if g-recaptcha-response is empty, submission never be verified
-
It seems that many people are having issues with Recaptcha V3 with Contact Form 7 5.1.
I am also experiencing issues where a large amount of spam is not checked against the Recaptcha V3 API.
It appears that in
wpcf7_recaptcha_verify_response
inmodules/recaptcha.php:109
, if the$_POST['g-recaptcha-response']
is not provided, or is blank, this filter returnsfalse
indicating that the submission is not spam.Therefore, spambots appear to be able to bypass the validation via the API by submitting an empty
g-recaptcha-response
form field.I presume that changing
if ( ! $token ) { return $spam; }
to
if ( ! $token ) { return true; }
in this function would address the issue, as any submission that did not attempt the Recaptcha validation would be rejected.
- The topic ‘ReCaptcha V3 — if g-recaptcha-response is empty, submission never be verified’ is closed to new replies.