From 249c5dc32db2e500619c6b3f35e0081ab868c1f5 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Wed, 15 Jan 2025 19:05:07 +0100 Subject: [PATCH] make sure to use workerthread only if they are really set to true --- backend/src/password/EncryptionWorker.ts | 2 +- backend/src/password/EncryptorUtils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/password/EncryptionWorker.ts b/backend/src/password/EncryptionWorker.ts index f14d5d1ff..5a223bee1 100644 --- a/backend/src/password/EncryptionWorker.ts +++ b/backend/src/password/EncryptionWorker.ts @@ -46,7 +46,7 @@ export const SecretKeyCryptographyCreateKey = ( return encryptionKeyHash.readBigUInt64LE() } -if (CONFIG.USE_CRYPTO_WORKER) { +if (CONFIG.USE_CRYPTO_WORKER === true) { worker({ SecretKeyCryptographyCreateKey, }) diff --git a/backend/src/password/EncryptorUtils.ts b/backend/src/password/EncryptorUtils.ts index 27432d1a3..f4dc00b6c 100644 --- a/backend/src/password/EncryptorUtils.ts +++ b/backend/src/password/EncryptorUtils.ts @@ -23,7 +23,7 @@ const configLoginServerKey = Buffer.from(CONFIG.LOGIN_SERVER_KEY, 'hex') let encryptionWorkerPool: Pool | undefined -if (CONFIG.USE_CRYPTO_WORKER) { +if (CONFIG.USE_CRYPTO_WORKER === true) { encryptionWorkerPool = pool( path.join(__dirname, '..', '..', 'build', 'src', 'password', '/EncryptionWorker.js'), {