Skip to content

Commit ce3b72c

Browse files
authored
Merge pull request #2712 from robintown/merge
Merge develop
2 parents e48d919 + 9355177 commit ce3b72c

38 files changed

+1587
-101
lines changed

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
Changes in [20.0.1](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v20.0.1) (2022-09-28)
2+
==================================================================================================
3+
4+
## 🐛 Bug Fixes
5+
* Fix missing return when receiving an invitation without shared history ([\#2710](https://github.com/matrix-org/matrix-js-sdk/pull/2710)).
6+
7+
Changes in [20.0.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v20.0.0) (2022-09-28)
8+
==================================================================================================
9+
10+
## 🚨 BREAKING CHANGES
11+
* Bump IDB crypto store version ([\#2705](https://github.com/matrix-org/matrix-js-sdk/pull/2705)).
12+
13+
Changes in [19.7.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v19.7.0) (2022-09-28)
14+
==================================================================================================
15+
16+
## 🔒 Security
17+
* Fix for [CVE-2022-39249](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE%2D2022%2D39249)
18+
* Fix for [CVE-2022-39250](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE%2D2022%2D39250)
19+
* Fix for [CVE-2022-39251](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE%2D2022%2D39251)
20+
* Fix for [CVE-2022-39236](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE%2D2022%2D39236)
21+
22+
Changes in [19.6.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v19.6.0) (2022-09-27)
23+
==================================================================================================
24+
25+
## ✨ Features
26+
* Add a property aggregating all names of a NamespacedValue ([\#2656](https://github.com/matrix-org/matrix-js-sdk/pull/2656)).
27+
* Implementation of MSC3824 to add action= param on SSO login ([\#2398](https://github.com/matrix-org/matrix-js-sdk/pull/2398)). Contributed by @hughns.
28+
* Add invited_count and joined_count to sliding sync room responses. ([\#2628](https://github.com/matrix-org/matrix-js-sdk/pull/2628)).
29+
* Base support for MSC3847: Ignore invites with policy rooms ([\#2626](https://github.com/matrix-org/matrix-js-sdk/pull/2626)). Contributed by @Yoric.
30+
31+
## 🐛 Bug Fixes
32+
* Fix handling of remote echoes doubling up ([\#2639](https://github.com/matrix-org/matrix-js-sdk/pull/2639)). Fixes #2618.
33+
134
Changes in [19.5.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v19.5.0) (2022-09-13)
235
==================================================================================================
336

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "matrix-js-sdk",
3-
"version": "19.5.0",
3+
"version": "20.0.1",
44
"description": "Matrix Client-Server SDK for Javascript",
55
"engines": {
66
"node": ">=12.9.0"

release.sh

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ yarn install --ignore-scripts --pure-lockfile
135135
# ignore leading v on release
136136
release="${1#v}"
137137
tag="v${release}"
138-
rel_branch="release-$tag"
139138

140139
prerelease=0
141140
# We check if this build is a prerelease by looking to
@@ -150,18 +149,7 @@ else
150149
read -p "Making a FINAL RELEASE, press enter to continue " REPLY
151150
fi
152151

153-
# We might already be on the release branch, in which case, yay
154-
# If we're on any branch starting with 'release', or the staging branch
155-
# we don't create a separate release branch (this allows us to use the same
156-
# release branch for releases and release candidates).
157-
curbranch=$(git symbolic-ref --short HEAD)
158-
if [[ "$curbranch" != release* && "$curbranch" != "staging" ]]; then
159-
echo "Creating release branch"
160-
git checkout -b "$rel_branch"
161-
else
162-
echo "Using current branch ($curbranch) for release"
163-
rel_branch=$curbranch
164-
fi
152+
rel_branch=$(git symbolic-ref --short HEAD)
165153

166154
if [ -z "$skip_changelog" ]; then
167155
echo "Generating changelog"

spec/integ/matrix-client-crypto.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@ describe("MatrixClient crypto", () => {
494494
aliTestClient.expectKeyQuery({ device_keys: { [aliUserId]: {} }, failures: {} });
495495
await aliTestClient.start();
496496
await bobTestClient.start();
497+
bobTestClient.client.crypto.deviceList.downloadKeys = () => Promise.resolve({});
497498
await firstSync(aliTestClient);
498499
await aliEnablesEncryption();
499500
await aliSendsFirstMessage();
@@ -504,6 +505,7 @@ describe("MatrixClient crypto", () => {
504505
aliTestClient.expectKeyQuery({ device_keys: { [aliUserId]: {} }, failures: {} });
505506
await aliTestClient.start();
506507
await bobTestClient.start();
508+
bobTestClient.client.crypto.deviceList.downloadKeys = () => Promise.resolve({});
507509
await firstSync(aliTestClient);
508510
await aliEnablesEncryption();
509511
await aliSendsFirstMessage();
@@ -567,6 +569,7 @@ describe("MatrixClient crypto", () => {
567569
aliTestClient.expectKeyQuery({ device_keys: { [aliUserId]: {} }, failures: {} });
568570
await aliTestClient.start();
569571
await bobTestClient.start();
572+
bobTestClient.client.crypto.deviceList.downloadKeys = () => Promise.resolve({});
570573
await firstSync(aliTestClient);
571574
await aliEnablesEncryption();
572575
await aliSendsFirstMessage();
@@ -584,6 +587,9 @@ describe("MatrixClient crypto", () => {
584587
await firstSync(bobTestClient);
585588
await aliEnablesEncryption();
586589
await aliSendsFirstMessage();
590+
bobTestClient.httpBackend.when('POST', '/keys/query').respond(
591+
200, {},
592+
);
587593
await bobRecvMessage();
588594
await bobEnablesEncryption();
589595
const ciphertext = await bobSendsReplyMessage();

spec/integ/matrix-client-syncing.spec.ts

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
import 'fake-indexeddb/auto';
18+
1719
import { Optional } from "matrix-events-sdk/lib/types";
1820
import HttpBackend from "matrix-mock-request";
1921

@@ -25,6 +27,8 @@ import {
2527
RoomMemberEvent,
2628
UNSTABLE_MSC2716_MARKER,
2729
MatrixClient,
30+
ClientEvent,
31+
IndexedDBCryptoStore,
2832
} from "../../src";
2933
import * as utils from "../test-utils/test-utils";
3034
import { TestClient } from "../TestClient";
@@ -87,6 +91,8 @@ describe("MatrixClient syncing", () => {
8791
});
8892

8993
it("should emit RoomEvent.MyMembership for invite->leave->invite cycles", async () => {
94+
await client.initCrypto();
95+
9096
const roomId = "!cycles:example.org";
9197

9298
// First sync: an invite
@@ -1426,3 +1432,70 @@ describe("MatrixClient syncing", () => {
14261432
return utils.syncPromise(client, numSyncs);
14271433
}
14281434
});
1435+
1436+
describe("MatrixClient syncing (IndexedDB version)", () => {
1437+
const selfUserId = "@alice:localhost";
1438+
const selfAccessToken = "aseukfgwef";
1439+
const syncData = {
1440+
next_batch: "batch_token",
1441+
rooms: {},
1442+
presence: {},
1443+
};
1444+
1445+
it("should emit ClientEvent.Room when invited while using indexeddb crypto store", async () => {
1446+
const idbTestClient = new TestClient(
1447+
selfUserId,
1448+
"DEVICE",
1449+
selfAccessToken,
1450+
undefined,
1451+
{ cryptoStore: new IndexedDBCryptoStore(global.indexedDB, "tests") },
1452+
);
1453+
const idbHttpBackend = idbTestClient.httpBackend;
1454+
const idbClient = idbTestClient.client;
1455+
idbHttpBackend.when("GET", "/versions").respond(200, {});
1456+
idbHttpBackend.when("GET", "/pushrules").respond(200, {});
1457+
idbHttpBackend.when("POST", "/filter").respond(200, { filter_id: "a filter id" });
1458+
1459+
await idbClient.initCrypto();
1460+
1461+
const roomId = "!invite:example.org";
1462+
1463+
// First sync: an invite
1464+
const inviteSyncRoomSection = {
1465+
invite: {
1466+
[roomId]: {
1467+
invite_state: {
1468+
events: [{
1469+
type: "m.room.member",
1470+
state_key: selfUserId,
1471+
content: {
1472+
membership: "invite",
1473+
},
1474+
}],
1475+
},
1476+
},
1477+
},
1478+
};
1479+
idbHttpBackend.when("GET", "/sync").respond(200, {
1480+
...syncData,
1481+
rooms: inviteSyncRoomSection,
1482+
});
1483+
1484+
// First fire: an initial invite
1485+
let fires = 0;
1486+
idbClient.once(ClientEvent.Room, (room) => {
1487+
fires++;
1488+
expect(room.roomId).toBe(roomId);
1489+
});
1490+
1491+
// noinspection ES6MissingAwait
1492+
idbClient.startClient();
1493+
await idbHttpBackend.flushAllExpected();
1494+
1495+
expect(fires).toBe(1);
1496+
1497+
idbHttpBackend.verifyNoOutstandingExpectation();
1498+
idbClient.stopClient();
1499+
idbHttpBackend.stop();
1500+
});
1501+
});

0 commit comments

Comments
 (0)