From f50dc6a5360ea33cec8e96a943f7a8aa7ff53100 Mon Sep 17 00:00:00 2001 From: Henry Heino <46334387+personalizedrefrigerator@users.noreply.github.com> Date: Fri, 1 Aug 2025 03:45:09 -0700 Subject: [PATCH] Chore: Work around test failure in newer NodeJS versions (#12830) --- packages/lib/package.json | 2 +- packages/lib/services/e2ee/RSA.node.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/lib/package.json b/packages/lib/package.json index d78c2caa1c..df21ad3ba1 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -12,7 +12,7 @@ "tsc": "tsc --project tsconfig.json", "watch": "tsc --watch --preserveWatchOutput --project tsconfig.json", "generatePluginTypes": "rm -rf ./plugin_types && yarn tsc --declaration --declarationDir ./plugin_types --project tsconfig.json", - "test": "node --security-revert=CVE-2023-46809 ./node_modules/.bin/jest --verbose=false", + "test": "jest", "test-ci": "yarn test" }, "devDependencies": { diff --git a/packages/lib/services/e2ee/RSA.node.ts b/packages/lib/services/e2ee/RSA.node.ts index 3d95cd1c3d..940b854e3f 100644 --- a/packages/lib/services/e2ee/RSA.node.ts +++ b/packages/lib/services/e2ee/RSA.node.ts @@ -6,6 +6,9 @@ const nodeRSAOptions: NodeRSA.Options = { // app when decrypted by RN-RSA. // https://github.com/amitaymolko/react-native-rsa-native/issues/66#issuecomment-932768139 encryptionScheme: 'pkcs1', + + // Allows NodeRSA to work with pkcs1-v1.5 in newer NodeJS versions: + environment: 'browser', }; const rsa: RSA = {