From 1629d7bb1d08674bb2a690df09c8c86a02fb57e4 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 17 Jul 2018 16:31:15 +0200 Subject: [PATCH] provide a SANE default in case httpUnsafeOrigin is not provided --- www/common/outer/login-block.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/outer/login-block.js b/www/common/outer/login-block.js index 4916ffa27..5938d4f72 100644 --- a/www/common/outer/login-block.js +++ b/www/common/outer/login-block.js @@ -107,7 +107,7 @@ define([ // if we want to make CryptPad work in server subfolders, we'll need // to update this path derivation return (typeof(ApiConfig.httpUnsafeOrigin) !== 'undefined'? - ApiConfig.httpUnsafeOrigin: window.location.origin) + ApiConfig.httpUnsafeOrigin: window.location.origin + '/') + 'block/' + publicKey.slice(0, 2) + '/' + publicKey; };