From 86306e3da3d792c9b43b2d2d20454e72b0aecfd7 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 10 Feb 2020 20:41:16 +0000 Subject: [PATCH] Recaptcha should always be loaded over https --- src/components/views/auth/CaptchaForm.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/views/auth/CaptchaForm.js b/src/components/views/auth/CaptchaForm.js index efcc450067..1b9dd3a97d 100644 --- a/src/components/views/auth/CaptchaForm.js +++ b/src/components/views/auth/CaptchaForm.js @@ -61,13 +61,9 @@ export default createReactClass({ } else { console.log("Loading recaptcha script..."); window.mx_on_recaptcha_loaded = () => {this._onCaptchaLoaded();}; - let protocol = global.location.protocol; - if (protocol !== "http:") { - protocol = "https:"; - } const scriptTag = document.createElement('script'); scriptTag.setAttribute( - 'src', `${protocol}//www.recaptcha.net/recaptcha/api.js?onload=mx_on_recaptcha_loaded&render=explicit`, + 'src', `https://www.recaptcha.net/recaptcha/api.js?onload=mx_on_recaptcha_loaded&render=explicit`, ); this._recaptchaContainer.current.appendChild(scriptTag); }