From c1d2fa6b52918ee2282b6436e196b650e5b5daad Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 22 Jun 2017 17:35:54 +0200 Subject: [PATCH] Unhack validateKey for the history mode --- www/common/common-hash.js | 2 -- www/common/common-history.js | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/www/common/common-hash.js b/www/common/common-hash.js index 48186239c..c4f452dc7 100644 --- a/www/common/common-hash.js +++ b/www/common/common-hash.js @@ -100,8 +100,6 @@ Version 1 var ret = {}; - if (typeof href !== "string") { console.error(href); } - if (!href) { return ret; } if (href.slice(-1) !== '/') { href += '/'; } diff --git a/www/common/common-history.js b/www/common/common-history.js index e75a192c1..9f417197e 100644 --- a/www/common/common-history.js +++ b/www/common/common-history.js @@ -44,7 +44,6 @@ define([ History.readOnly = 2; } else if (!secret.keys.validateKey) { - secret.keys.validateKey = true; History.readOnly = 0; } @@ -70,6 +69,10 @@ define([ return; } if (parsed[0] !== 'FULL_HISTORY') { return; } + if (parsed[1] && parsed[1].validateKey) { // First message + secret.keys.validateKey = parsed[1].validateKey; + return; + } msg = parsed[1][4]; if (msg) { msg = msg.replace(/^cp\|/, '');