diff --git a/.nvmrc b/.nvmrc index 48b14e6b2b56..907565957308 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.14.0 +20.15.0 diff --git a/app/attachment_channel.ts b/app/attachment_channel.ts index e9f4bb7cdcd0..1698fe28d50e 100644 --- a/app/attachment_channel.ts +++ b/app/attachment_channel.ts @@ -352,6 +352,10 @@ export async function handleAttachmentRequest(req: Request): Promise { plaintext ); } catch (error) { + console.error( + 'handleAttachmentRequest: decryption error', + Errors.toLogFormat(error) + ); plaintext.emit('error', error); } } @@ -459,6 +463,10 @@ function handleRangeRequest({ try { await pipeline(plaintext, transform); } catch (error) { + console.error( + 'handleAttachmentRequest: range transform error', + Errors.toLogFormat(error) + ); transform.emit('error', error); } })() diff --git a/package-lock.json b/package-lock.json index 559f419bd568..983e57ca01a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -208,7 +208,7 @@ "csv-parse": "5.5.2", "danger": "11.3.1", "debug": "4.3.3", - "electron": "31.1.0", + "electron": "31.2.0", "electron-builder": "24.13.3", "electron-mocha": "12.2.0", "endanger": "7.0.4", @@ -261,7 +261,7 @@ "webpack-dev-server": "4.11.1" }, "engines": { - "node": "20.14.0" + "node": "20.15.0" }, "optionalDependencies": { "fs-xattr": "0.3.0" @@ -17899,12 +17899,11 @@ } }, "node_modules/electron": { - "version": "31.1.0", - "resolved": "https://registry.npmjs.org/electron/-/electron-31.1.0.tgz", - "integrity": "sha512-TBOwqLxSxnx6+pH6GMri7R3JPH2AkuGJHfWZS0p1HsmN+Qr1T9b0IRJnnehSd/3NZAmAre4ft9Ljec7zjyKFJA==", + "version": "31.2.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-31.2.0.tgz", + "integrity": "sha512-5w+kjOsGiTXytPSErBPNp/3znnuEMKc42RD41MqRoQkiYaR8x/Le2+qWk1cL60UwE/67oeKnOHnnol8xEuldGg==", "dev": true, "hasInstallScript": true, - "license": "MIT", "dependencies": { "@electron/get": "^2.0.0", "@types/node": "^20.9.0", diff --git a/package.json b/package.json index 980cad0786ac..2d88c25b940a 100644 --- a/package.json +++ b/package.json @@ -290,7 +290,7 @@ "csv-parse": "5.5.2", "danger": "11.3.1", "debug": "4.3.3", - "electron": "31.1.0", + "electron": "31.2.0", "electron-builder": "24.13.3", "electron-mocha": "12.2.0", "endanger": "7.0.4", @@ -366,7 +366,7 @@ } }, "engines": { - "node": "20.14.0" + "node": "20.15.0" }, "build": { "appId": "org.whispersystems.signal-desktop", diff --git a/ts/Crypto.ts b/ts/Crypto.ts index aa7112d8d4fb..30fd2307bdbd 100644 --- a/ts/Crypto.ts +++ b/ts/Crypto.ts @@ -6,6 +6,7 @@ import Long from 'long'; import { HKDF } from '@signalapp/libsignal-client'; import * as Bytes from './Bytes'; +import { Crypto } from './context/Crypto'; import { calculateAgreement, generateKeyPair } from './Curve'; import { HashType, CipherType, UUID_BYTE_SIZE } from './types/Crypto'; import { ProfileDecryptError } from './types/errors'; @@ -734,7 +735,7 @@ export function decryptProfileName( // SignalContext APIs // -const { crypto } = globalThis.window?.SignalContext ?? {}; +const crypto = globalThis.window?.SignalContext.crypto || new Crypto(); export function sign(key: Uint8Array, data: Uint8Array): Uint8Array { return crypto.sign(key, data);