2

"You are receiving this email because you are registered as a website administrator using reCAPTCHA, and your website is still using reCAPTCHA v1, which will be turned off on March 31, 2018. We announced the reCAPTCHA v1 deprecation in May 2016. Starting in November 2017, a small percentage of reCAPTCHA v1 traffic will begin to show a notice informing users that the old API will soon be retired. Any calls to the v1 API will not work after March 31, 2018. To ensure continued functionality, you’ll need to update your website to a current version of reCAPTCHA. You can learn more about reCAPTCHA v2, Invisible reCAPTCHA and reCAPTCHA Android API in our Developer’s Guide. The new APIs are simple to implement and will streamline the captcha experience for your users. If you need help, you can engage in the reCAPTCHA Google Developer Group or post to Stack Overflow with the ‘recaptcha’ tag."

How can I update the recaptcha in civicrm to v2 , where should I make the changes in the code and in frontend to make the recaptcha functionality to work in tandem with v2 ?

  • This would not work for me in Civicrm 4.1.5. with Drupal 6. Uploading the new ReCAPTCHA.php file returned a 505 error on the civicrm forms with recaptcha enabled in a profile. When I re-load the original ReCAPTCHA.php file with new .lib file, the forms and ReCAPTCHA appears but it won't pass the form (returns a "• is a required field." message). I should say that recaptcha v2 works fine in Drupal forms, just not the civicrm forms. Any thoughts? I though I had fixed this by altering the SSL code on line 83, but that only lasted five minutes. – michael Apr 8 '18 at 17:31
3

I was able to apply these patches directly to CiviCRM 4.5.4. Looking at the code, this version is virtually identical in the ReCAPTCHA code, so it should work fine (although you may need to manually apply the patches).

Update this file: /civicrm/packages/recaptcha/recaptchalib.php

with: https://github.com/civicrm/civicrm-packages/pull/92/files

Update this file: /civicrm/CRM/Utils/ReCPATCHA.php

With: https://github.com/civicrm/civicrm-core/pull/5015/files

In browser go to: https://www.google.com/recaptcha and update / create a V.2 key for the website.

then go to: (Administer -> System Settings -> Misc) civiURL: /civicrm/admin/setting/misc?reset=1

Update the Public / Private keys with the new keys.

Cleanup caches: via your civi URL: /civicrm/admin/setting/updateConfigBackend?reset=1

| improve this answer | |
  • I have posted an issue with recaptcha here - civicrm.stackexchange.com/questions/30492/…. Google reports "We detected that your site is not verifying reCAPTCHA solutions. This is required for the proper use of reCAPTCHA on your site" Trying to find anyone who knows about this message. Thanks – Dave T May 10 '19 at 14:29
1

Unfortunately /civicrm/packages/recaptcha/recaptchalib.php is quite dated and does not work with reCaptcha v2 for old CiviCRM setups ( have not tested with the most recent 5xx CiviCRM). I have not been able to make @Koji solution work either, so had to rewrite it all (both /civicrm/packages/recaptcha/recaptchalib.php and /civicrm/CRM/Utils/ReCAPTCHA.php). On the bright side, since this topic does not seem to gain much attention lately ( apart from this follow-up ) it seems reCaptcha v2 works in the latest CiviCRM.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.