From: Alexy Mikhailichenko Date: Thu, 14 Feb 2019 22:12:19 +0000 (-0500) Subject: Always load recaptcha JS over HTTPS X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4ab92bbc4c6b2c7d8328bfb407ea7de77a3abbaf;p=civicrm-core.git Always load recaptcha JS over HTTPS --- 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);