From 3e23254c00e824f50a889100c798a139d05b9aca Mon Sep 17 00:00:00 2001 From: Stefano Rivoir Date: Mon, 28 Jul 2025 10:31:55 +0200 Subject: [PATCH] Fix create items for legacy personal key Fixes #299 --- lib/crypt.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/crypt.mjs b/lib/crypt.mjs index 764b359..f3b906f 100644 --- a/lib/crypt.mjs +++ b/lib/crypt.mjs @@ -39,7 +39,7 @@ export function decryptPersonalKey (ekey, personaltoken) { // Extract password and seed from personal token const data = decodePersonalToken(personaltoken) - const hash = crypto.pbkdf2Sync(data.password, data.seed || Config.get().master_key, 12, 32, 'sha256') + const hash = crypto.pbkdf2Sync(data.password, data.seed.length ? data.seed : Config.get().master_key, 12, 32, 'sha256') // Clear the data buffers data.password.fill(0)