projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b98101a
)
fixes for missing recaptcha_check_answer() when validate is called by other extensions
author
Kurund Jalmi
<kurund.jalmi@gmail.com>
Thu, 18 Aug 2022 16:03:21 +0000
(17:03 +0100)
committer
GitHub
<noreply@github.com>
Thu, 18 Aug 2022 16:03:21 +0000
(17:03 +0100)
ext/recaptcha/CRM/Utils/ReCAPTCHA.php
patch
|
blob
|
blame
|
history
diff --git
a/ext/recaptcha/CRM/Utils/ReCAPTCHA.php
b/ext/recaptcha/CRM/Utils/ReCAPTCHA.php
index 33c78e174f9c9295332fe77dba7ec7ef8d61557d..85e483dd19c14494d054bb2f123b7e0a8ffa0d24 100644
(file)
--- 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']