From: Kurund Jalmi Date: Thu, 18 Aug 2022 16:03:21 +0000 (+0100) Subject: fixes for missing recaptcha_check_answer() when validate is called by other extensions X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a7e53b43c312013e2cb1f81759ed38e3c76b8a48;p=civicrm-core.git fixes for missing recaptcha_check_answer() when validate is called by other extensions --- diff --git a/ext/recaptcha/CRM/Utils/ReCAPTCHA.php b/ext/recaptcha/CRM/Utils/ReCAPTCHA.php index 33c78e174f..85e483dd19 100644 --- a/ext/recaptcha/CRM/Utils/ReCAPTCHA.php +++ b/ext/recaptcha/CRM/Utils/ReCAPTCHA.php @@ -202,6 +202,8 @@ class CRM_Utils_ReCAPTCHA { * @return mixed */ public static function validate($value, $form) { + require_once E::path('lib/recaptcha/recaptchalib.php'); + $resp = recaptcha_check_answer(CRM_Core_Config::singleton()->recaptchaPrivateKey, $_SERVER['REMOTE_ADDR'], $_POST['g-recaptcha-response']