diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 611207a22..5ed4dd08d 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -1050,7 +1050,7 @@ define([ var blockHash = LocalStore.getBlockHash(); if (blockHash) { console.log(blockHash); - var parsed = Hash.parseBlockHash(blockHash); + var parsed = Block.parseBlockHash(blockHash); if (typeof(parsed) !== 'object') { console.error("Failed to parse blockHash"); diff --git a/www/common/outer/local-store.js b/www/common/outer/local-store.js index 645acb1b5..4eab5140d 100644 --- a/www/common/outer/local-store.js +++ b/www/common/outer/local-store.js @@ -58,7 +58,7 @@ define([ localStorage[Constants.userHashKey] = sHash; }; - LocalStore.getBlockHash = function () { + var getBlockHash = LocalStore.getBlockHash = function () { return localStorage[Constants.blockHashKey]; }; @@ -71,7 +71,8 @@ define([ }; LocalStore.isLoggedIn = function () { - return typeof getUserHash() === "string"; + return typeof getBlockHash() === 'string' || + typeof getUserHash() === "string"; }; diff --git a/www/common/outer/login-block.js b/www/common/outer/login-block.js index 4e62b7717..0b8f91036 100644 --- a/www/common/outer/login-block.js +++ b/www/common/outer/login-block.js @@ -34,8 +34,6 @@ define([ var symmetric = seed.subarray(Nacl.sign.seedLength, Nacl.sign.seedLength + Nacl.secretbox.keyLength); - console.log("symmetric key: ", Nacl.util.encodeBase64(symmetric)); - return { sign: Nacl.sign.keyPair.fromSeed(signSeed), // 32 bytes symmetric: symmetric, // 32 bytes ...