From d44f1880a43e6aa8b53b9d15159d35b1302392ad Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 18 Dec 2020 20:17:50 +0530 Subject: [PATCH] temporarily disable the document cache, wait to clear it before redirecting to login --- www/common/cryptpad-common.js | 12 ++++++------ www/common/outer/async-store.js | 4 ++-- www/common/outer/sharedfolder.js | 2 +- www/common/outer/team.js | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 1a65fa551..006f150d7 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -1903,12 +1903,12 @@ define([ var requestLogin = function () { // log out so that you don't go into an endless loop... - LocalStore.logout(); - - // redirect them to log in, and come back when they're done. - var href = Hash.hashToHref('', 'login'); - var url = Hash.getNewPadURL(href, { href: currentPad.href }); - window.location.href = url; + LocalStore.logout(function () { + // redirect them to log in, and come back when they're done. + var href = Hash.hashToHref('', 'login'); + var url = Hash.getNewPadURL(href, { href: currentPad.href }); + window.location.href = url; + }); }; common.startAccountDeletion = function (data, cb) { diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 58fd28e00..2c008a09e 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -1631,7 +1631,7 @@ define([ Store.leavePad(null, data, function () {}); }; var conf = { - Cache: Cache, + //Cache: Cache, // XXX re-enable cache usage onCacheStart: function () { postMessage(clientId, "PAD_CACHE"); }, @@ -2686,7 +2686,7 @@ define([ readOnly: false, validateKey: secret.keys.validateKey || undefined, crypto: Crypto.createEncryptor(secret.keys), - Cache: Cache, + //Cache: Cache, // XXX re-enable cache usage userName: 'fs', logLevel: 1, ChainPad: ChainPad, diff --git a/www/common/outer/sharedfolder.js b/www/common/outer/sharedfolder.js index 3c1c8632d..518367826 100644 --- a/www/common/outer/sharedfolder.js +++ b/www/common/outer/sharedfolder.js @@ -175,7 +175,7 @@ define([ ChainPad: ChainPad, classic: true, network: network, - Cache: Cache, + //Cache: Cache, // XXX re-enable cache usage metadata: { validateKey: secret.keys.validateKey || undefined, owners: owners diff --git a/www/common/outer/team.js b/www/common/outer/team.js index f23fb8a18..38e83608a 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -427,7 +427,7 @@ define([ channel: secret.channel, crypto: crypto, ChainPad: ChainPad, - Cache: Cache, + //Cache: Cache, // XXX re-enable cache usage metadata: { validateKey: secret.keys.validateKey || undefined, },