Skip to content

Commit 8f597f0

Browse files
authored
Update matrix-sdk-crypto-wasm to 15.0.0 (#4882)
For js-sdk users, this includes the following: - Send stable identifier `sender_device_keys` for MSC4147 (Including device keys with Olm-encrypted events). ([#4964](matrix-org/matrix-rust-sdk#4964)) - Check the `sender_device_keys` field on _all_ incoming Olm-encrypted to-device messages and ignore any to-device messages which include the field but whose data is invalid (as per [MSC4147](matrix-org/matrix-spec-proposals#4147)). ([#4922](matrix-org/matrix-rust-sdk#4922)) - Fix bug which caused room keys to be unnecessarily rotated on every send in the presence of blacklisted/withheld devices in the room. ([#4954](matrix-org/matrix-rust-sdk#4954)) - Fix [matrix-rust-sdk#2729](matrix-org/matrix-rust-sdk#2729) which in rare cases can cause room key oversharing. ([#4975](matrix-org/matrix-rust-sdk#4975))
1 parent 67df2a5 commit 8f597f0

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
],
5050
"dependencies": {
5151
"@babel/runtime": "^7.12.5",
52-
"@matrix-org/matrix-sdk-crypto-wasm": "^14.2.0",
52+
"@matrix-org/matrix-sdk-crypto-wasm": "^15.0.0",
5353
"another-json": "^0.2.0",
5454
"bs58": "^6.0.0",
5555
"content-type": "^1.0.4",

src/rust-crypto/rust-crypto.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { type IHttpOpts, type MatrixHttpApi, Method } from "../http-api/index.ts
3535
import { RoomEncryptor } from "./RoomEncryptor.ts";
3636
import { OutgoingRequestProcessor } from "./OutgoingRequestProcessor.ts";
3737
import { KeyClaimManager } from "./KeyClaimManager.ts";
38-
import { logDuration, MapWithDefault } from "../utils.ts";
38+
import { MapWithDefault } from "../utils.ts";
3939
import {
4040
type BackupTrustInfo,
4141
type BootstrapCrossSigningOpts,
@@ -1494,17 +1494,14 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, CryptoEventH
14941494
unusedFallbackKeys?: Set<string>;
14951495
devices?: RustSdkCryptoJs.DeviceLists;
14961496
}): Promise<IToDeviceEvent[]> {
1497-
const result = await logDuration(logger, "receiveSyncChanges", async () => {
1498-
return await this.olmMachine.receiveSyncChanges(
1499-
events ? JSON.stringify(events) : "[]",
1500-
devices,
1501-
oneTimeKeysCounts,
1502-
unusedFallbackKeys,
1503-
);
1504-
});
1497+
const result = await this.olmMachine.receiveSyncChanges(
1498+
events ? JSON.stringify(events) : "[]",
1499+
devices,
1500+
oneTimeKeysCounts,
1501+
unusedFallbackKeys,
1502+
);
15051503

1506-
// receiveSyncChanges returns a JSON-encoded list of decrypted to-device messages.
1507-
return JSON.parse(result);
1504+
return result.map((processed) => JSON.parse(processed.rawEvent));
15081505
}
15091506

15101507
/** called by the sync loop to preprocess incoming to-device messages

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,10 +1705,10 @@
17051705
"@jridgewell/resolve-uri" "^3.1.0"
17061706
"@jridgewell/sourcemap-codec" "^1.4.14"
17071707

1708-
"@matrix-org/matrix-sdk-crypto-wasm@^14.2.0":
1709-
version "14.2.1"
1710-
resolved "https://registry.yarnpkg.com/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-14.2.1.tgz#f760b09cab7b48b0ad59332dd255756e1ee80eb4"
1711-
integrity sha512-HDCaAnIxz/3jJTB2EUYKFgVaI+auS0piIZxPDXHhk1Kn7yZWwKvVvCHkFqBJgBhZOAazbDU7MVArvrtn8QFkoQ==
1708+
"@matrix-org/matrix-sdk-crypto-wasm@^15.0.0":
1709+
version "15.0.0"
1710+
resolved "https://registry.yarnpkg.com/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-15.0.0.tgz#5b29ca1c62f3aface9db06d7441d0a9ba2cd3439"
1711+
integrity sha512-tzBGf/jugrOw190Na77LljZIQMTSL6SAnZaATKMlb2j1XOfc5Q+bSJTb9ZWBR7TFs0d8K9spcwRHPc4S/7CMYw==
17121712

17131713
"@matrix-org/olm@3.2.15":
17141714
version "3.2.15"

0 commit comments

Comments
 (0)