From b67ca5c42d9be0dd67ab49f7753923eeebc68250 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Fri, 10 Aug 2018 17:04:09 +0300 Subject: [PATCH] Set master --- client/src/builtin/E2EE.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/builtin/E2EE.js b/client/src/builtin/E2EE.js index 84089588..7c3c6b1e 100644 --- a/client/src/builtin/E2EE.js +++ b/client/src/builtin/E2EE.js @@ -26,7 +26,9 @@ export default new class E2EE extends BuiltinModule { setMaster(key) { seed = Math.random().toString(36).replace(/[^a-z]+/g, ''); - this.master = this.encrypt(seed, key); + const newMaster = this.encrypt(seed, key); + // TODO re-encrypt everything with new master + return (this.master = newMaster); } get settingPath() {