From a0d54bd43ad4771fe6d3348e1f668a3e204aaeee Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 6 Apr 2020 16:40:53 +0100 Subject: [PATCH] Clear sessionStorage on sign out The browser's `sessionStorage` is only used for composer history today, but still we should also clear this on sign out for those on shared computers, etc. Fixes https://github.com/vector-im/riot-web/issues/13041 --- src/Lifecycle.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Lifecycle.js b/src/Lifecycle.js index b9fbf4f1bc..305a73fbad 100644 --- a/src/Lifecycle.js +++ b/src/Lifecycle.js @@ -637,6 +637,10 @@ async function _clearStorage() { window.localStorage.clear(); } + if (window.sessionStorage) { + window.sessionStorage.clear(); + } + // create a temporary client to clear out the persistent stores. const cli = createMatrixClient({ // we'll never make any requests, so can pass a bogus HS URL