From 6d7e88a84a125a7e52d0fcc1d80493fe5252697e Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 23 Jan 2019 15:06:49 +0000 Subject: [PATCH] Fix desktop captcha check Change gnarly hardcoded protocol to detect running in the electron app Fixes https://github.com/vector-im/riot-web/issues/8236 --- src/components/views/auth/CaptchaForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/auth/CaptchaForm.js b/src/components/views/auth/CaptchaForm.js index ab1bfbd393..eba1682b03 100644 --- a/src/components/views/auth/CaptchaForm.js +++ b/src/components/views/auth/CaptchaForm.js @@ -62,7 +62,7 @@ module.exports = React.createClass({ console.log("Loading recaptcha script..."); window.mx_on_recaptcha_loaded = () => {this._onCaptchaLoaded();}; const protocol = global.location.protocol; - if (protocol === "file:") { + if (protocol === "vector:") { const warning = document.createElement('div'); // XXX: fix hardcoded app URL. Better solutions include: // * jumping straight to a hosted captcha page (but we don't support that yet)