Clear localStorage settings on logout

pull/1/head
yflory 4 years ago
parent 0008cff503
commit 9210bbd4fc

@ -109,6 +109,13 @@ define([
delete localStorage[k];
delete sessionStorage[k];
});
try {
Object.keys(localStorage || {}).forEach(function (k) {
// Remvoe everything in localStorage except CACHE and FS_hash
if (/^CRYPTPAD_CACHE/.test(k) || /^LESS_CACHE/.test(k) || k === Constants.fileHashKey) { return; }
delete localStorage[k];
});
} catch (e) { console.error(e); }
LocalStore.clearThumbnail();
// Make sure we have an FS_hash in localStorage before reloading all the tabs
// so that we don't end up with tabs using different anon hashes

Loading…
Cancel
Save