Fix undefined user hash in localStorage #1298

This commit is contained in:
yflory 2023-10-20 14:19:35 +02:00
parent 6e50b9d9dc
commit 33b1376b5c
2 changed files with 2 additions and 2 deletions

View File

@ -1235,7 +1235,7 @@ define([
var nSecret = secret;
if (cfg.isDrive) {
// Shared folder or user hash or fs hash
var hash = Utils.LocalStore.getUserHash() || Utils.LocalStore.getFSHash();
var hash = Cryptpad.userHash || Utils.LocalStore.getFSHash();
if (data.sharedFolder) { hash = data.sharedFolder.hash; }
if (hash) {
var password = (data.sharedFolder && data.sharedFolder.password) || undefined;

View File

@ -51,7 +51,7 @@ define([
require([
'/common/cryptget.js',
], function (Crypt) {
var k = Utils.LocalStore.getUserHash() || Utils.LocalStore.getFSHash();
var k = Cryptpad.userHash || Utils.LocalStore.getFSHash();
Crypt.put(k, sjson, function (err) {
cb(err);
});