From 0c3b898000eda671a15b7711959fa2132b9604bd Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 6 Jul 2018 10:28:41 +0200 Subject: [PATCH] simple one line fixes --- www/common/cryptpad-common.js | 2 +- www/common/outer/local-store.js | 5 +++-- www/common/outer/login-block.js | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) 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 ...