From 8e6830d080fd3bffdddde0024f90dfd123a2b186 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 12 Dec 2016 18:24:45 +0100 Subject: [PATCH] Fix file manager with a chosen hash --- www/common/cryptpad-common.js | 1 + www/file/main.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index fdc212cec..882ae2656 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -185,6 +185,7 @@ define([ secret.key = Crypto.createEditCryptor().editKeyStr; } else { var hash = secretHash || window.location.hash.slice(1); + console.log(hash); if (hash.length === 0) { secret.keys = Crypto.createEditCryptor(); secret.key = Crypto.createEditCryptor().editKeyStr; diff --git a/www/file/main.js b/www/file/main.js index b54b9908a..3122070d3 100644 --- a/www/file/main.js +++ b/www/file/main.js @@ -19,7 +19,7 @@ define([ var $iframe = $('#pad-iframe').contents(); var ifrw = $('#pad-iframe')[0].contentWindow; - var hash = window.location.hash || localStorage.FS_hash; + var hash = window.location.hash.slice(1) || localStorage.FS_hash; var secret = Cryptpad.getSecrets(hash); var ROOT = "root";