From 4ab92bbc4c6b2c7d8328bfb407ea7de77a3abbaf Mon Sep 17 00:00:00 2001 From: Alexy Mikhailichenko Date: Thu, 14 Feb 2019 17:12:19 -0500 Subject: [PATCH] Always load recaptcha JS over HTTPS --- CRM/Utils/ReCAPTCHA.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CRM/Utils/ReCAPTCHA.php b/CRM/Utils/ReCAPTCHA.php index 4cb2045944..d1afe457a1 100644 --- a/CRM/Utils/ReCAPTCHA.php +++ b/CRM/Utils/ReCAPTCHA.php @@ -98,11 +98,10 @@ class CRM_Utils_ReCAPTCHA { require_once 'packages/recaptcha/recaptchalib.php'; } - // See if we are using SSL - if (CRM_Utils_System::isSSL()) { - $useSSL = TRUE; - } - $html = recaptcha_get_html($config->recaptchaPublicKey, $error, $useSSL); + // Load the Recaptcha api.js over HTTPS + $useHTTPS = TRUE; + + $html = recaptcha_get_html($config->recaptchaPublicKey, $error, $useHTTPS); $form->assign('recaptchaHTML', $html); $form->assign('recaptchaOptions', $config->recaptchaOptions); -- 2.25.1