mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-20 02:08:57 +00:00
Fix uncaught error in AttachmentCrypto
This commit is contained in:
@@ -9836,7 +9836,7 @@ DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## gimli 0.31.1, heck 0.5.0, unicode-xid 0.2.6
|
## gimli 0.31.1, heck 0.5.0, unicode-segmentation 1.12.0, unicode-xid 0.2.6
|
||||||
|
|
||||||
```
|
```
|
||||||
Copyright (c) 2015 The Rust Project Developers
|
Copyright (c) 2015 The Rust Project Developers
|
||||||
|
|||||||
@@ -132,7 +132,7 @@
|
|||||||
"@react-aria/utils": "3.25.3",
|
"@react-aria/utils": "3.25.3",
|
||||||
"@react-spring/web": "9.7.5",
|
"@react-spring/web": "9.7.5",
|
||||||
"@react-types/shared": "3.27.0",
|
"@react-types/shared": "3.27.0",
|
||||||
"@signalapp/libsignal-client": "0.83.0",
|
"@signalapp/libsignal-client": "0.85.1",
|
||||||
"@signalapp/minimask": "1.0.1",
|
"@signalapp/minimask": "1.0.1",
|
||||||
"@signalapp/mute-state-change": "workspace:1.0.0",
|
"@signalapp/mute-state-change": "workspace:1.0.0",
|
||||||
"@signalapp/quill-cjs": "2.1.2",
|
"@signalapp/quill-cjs": "2.1.2",
|
||||||
|
|||||||
10
pnpm-lock.yaml
generated
10
pnpm-lock.yaml
generated
@@ -129,8 +129,8 @@ importers:
|
|||||||
specifier: 3.27.0
|
specifier: 3.27.0
|
||||||
version: 3.27.0(react@18.3.1)
|
version: 3.27.0(react@18.3.1)
|
||||||
'@signalapp/libsignal-client':
|
'@signalapp/libsignal-client':
|
||||||
specifier: 0.83.0
|
specifier: 0.85.1
|
||||||
version: 0.83.0
|
version: 0.85.1
|
||||||
'@signalapp/minimask':
|
'@signalapp/minimask':
|
||||||
specifier: 1.0.1
|
specifier: 1.0.1
|
||||||
version: 1.0.1
|
version: 1.0.1
|
||||||
@@ -3492,8 +3492,8 @@ packages:
|
|||||||
'@signalapp/libsignal-client@0.76.7':
|
'@signalapp/libsignal-client@0.76.7':
|
||||||
resolution: {integrity: sha512-iGWTlFkko7IKlm96Iy91Wz5sIN089nj02ifOk6BWtLzeVi0kFaNj+jK26Sl1JRXy/VfXevcYtiOivOg43BPqpg==}
|
resolution: {integrity: sha512-iGWTlFkko7IKlm96Iy91Wz5sIN089nj02ifOk6BWtLzeVi0kFaNj+jK26Sl1JRXy/VfXevcYtiOivOg43BPqpg==}
|
||||||
|
|
||||||
'@signalapp/libsignal-client@0.83.0':
|
'@signalapp/libsignal-client@0.85.1':
|
||||||
resolution: {integrity: sha512-QaXviPAvj4PA2QDmN6YyPnlkp699BE3fIgaJmKrfvZMsvBfMGeJ3H3BHFt0CV2vUWMbc3oEgxbwdXu//f6oTrA==}
|
resolution: {integrity: sha512-AXOug/lcEQOgKt46VOfL9yE+3V8kRKggscORytIImT/F4qehsGNgHwJjpi+bwFbw2dEhBCqEoDu8m1n96WZ7Gg==}
|
||||||
|
|
||||||
'@signalapp/minimask@1.0.1':
|
'@signalapp/minimask@1.0.1':
|
||||||
resolution: {integrity: sha512-QAwo0joA60urTNbW9RIz6vLKQjy+jdVtH7cvY0wD9PVooD46MAjE40MLssp4xUJrph91n2XvtJ3pbEUDrmT2AA==}
|
resolution: {integrity: sha512-QAwo0joA60urTNbW9RIz6vLKQjy+jdVtH7cvY0wD9PVooD46MAjE40MLssp4xUJrph91n2XvtJ3pbEUDrmT2AA==}
|
||||||
@@ -14290,7 +14290,7 @@ snapshots:
|
|||||||
type-fest: 4.26.1
|
type-fest: 4.26.1
|
||||||
uuid: 11.0.2
|
uuid: 11.0.2
|
||||||
|
|
||||||
'@signalapp/libsignal-client@0.83.0':
|
'@signalapp/libsignal-client@0.85.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
node-gyp-build: 4.8.4
|
node-gyp-build: 4.8.4
|
||||||
type-fest: 4.26.1
|
type-fest: 4.26.1
|
||||||
|
|||||||
@@ -387,17 +387,6 @@ export async function decryptAttachmentV2ToSink(
|
|||||||
const hmac = createHmac(HashType.size256, macKey);
|
const hmac = createHmac(HashType.size256, macKey);
|
||||||
const plaintextHash = createHash(HashType.size256);
|
const plaintextHash = createHash(HashType.size256);
|
||||||
|
|
||||||
const incrementalDigestValidator =
|
|
||||||
options.type === 'standard' &&
|
|
||||||
options.theirIncrementalMac &&
|
|
||||||
options.theirChunkSize
|
|
||||||
? new ValidatingPassThrough(
|
|
||||||
Buffer.from(macKey),
|
|
||||||
everyNthByte(options.theirChunkSize),
|
|
||||||
Buffer.from(options.theirIncrementalMac)
|
|
||||||
)
|
|
||||||
: undefined;
|
|
||||||
|
|
||||||
let theirMac: Uint8Array | undefined;
|
let theirMac: Uint8Array | undefined;
|
||||||
|
|
||||||
// When downloading from backup there is an outer encryption layer; in that case we
|
// When downloading from backup there is an outer encryption layer; in that case we
|
||||||
@@ -436,6 +425,19 @@ export async function decryptAttachmentV2ToSink(
|
|||||||
throw missingCaseError(options);
|
throw missingCaseError(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initializing `ValidatingPassThrough` might throw on invalid parameters so
|
||||||
|
// it is important to do it within `try {} catch {}`
|
||||||
|
const incrementalDigestValidator =
|
||||||
|
options.type === 'standard' &&
|
||||||
|
options.theirIncrementalMac &&
|
||||||
|
options.theirChunkSize
|
||||||
|
? new ValidatingPassThrough(
|
||||||
|
Buffer.from(macKey),
|
||||||
|
everyNthByte(options.theirChunkSize),
|
||||||
|
Buffer.from(options.theirIncrementalMac)
|
||||||
|
)
|
||||||
|
: undefined;
|
||||||
|
|
||||||
await pipeline(
|
await pipeline(
|
||||||
[
|
[
|
||||||
ciphertextStream,
|
ciphertextStream,
|
||||||
|
|||||||
Reference in New Issue
Block a user