mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-11-04 02:02:14 +01:00 
			
		
		
		
	Recaptcha should always be loaded over https
This commit is contained in:
		
							parent
							
								
									3c49515e08
								
							
						
					
					
						commit
						86306e3da3
					
				@ -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);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user