Duplicate captchas if on <5.53 and you previously had the forceRecaptcha setting turned on
The forceRecaptcha setting comes from the core extension. If you are on a version earlier than 5.53 and previously had it on before installing formprotection, then the core code from https://github.com/civicrm/civicrm-core/commit/c1b477a0f78664dd2bb364ce0ddeb3df6721eedd still triggers a call to CRM_Utils_ReCAPTCHA::enableCaptchaOnForm()
, but this setting is no longer visible in the UI.
Obviously the best answer is "upgrade civi", and the next simplest answer is change the setting to 0 with cv
, so I don't think I'll make a PR, but just putting this here in case anyone else has the same problem since it took a while to track down.
Adding that the reason duplicates are a problem is that there are two g-recaptcha-token fields, and only the first one gets filled in, but it's the blank value from the second one that is in $_POST
. This doesn't seem to be a problem with stripe because it has separate code to get the token, but is a problem with authorize.net for example.