Skip to content

Commit 70e1aa3

Browse files
committed
Merge tag 'v3.76.0' into sc
* Fixes for [CVE-2023-37259](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2023-37259) / [GHSA-c9vx-2g7w-rp65](GHSA-c9vx-2g7w-rp65) * GYU: Update banner ([\matrix-org#11211](matrix-org#11211)). Fixes element-hq/element-web#25530. Contributed by @justjanne. * Linkify mxc:// URLs as links to your media repo ([\matrix-org#11213](matrix-org#11213)). Fixes element-hq/element-web#6942. * OIDC: Log in ([\matrix-org#11199](matrix-org#11199)). Fixes element-hq/element-web#25657. Contributed by @kerryarchibald. * Handle all permitted url schemes in linkify ([\matrix-org#11215](matrix-org#11215)). Fixes element-hq/element-web#4457 and element-hq/element-web#8720. * Autoapprove Element Call oidc requests ([\matrix-org#11209](matrix-org#11209)). Contributed by @toger5. * Allow creating knock rooms ([\matrix-org#11182](matrix-org#11182)). Contributed by @charlynguyen. * feat(faq): remove keyboard shortcuts button ([\matrix-org#9342](matrix-org#9342)). Fixes element-hq/element-web#22625. Contributed by @gefgu. * Expose and pre-populate thread ID in devtools dialog ([\matrix-org#10953](matrix-org#10953)). * Hide URL preview if it will be empty ([\matrix-org#9029](matrix-org#9029)). * Change wording from avatar to profile picture ([\matrix-org#7015](matrix-org#7015)). Fixes element-hq/element-meta#1331. Contributed by @aaronraimist. * Quick and dirty devtool to explore state history ([\matrix-org#11197](matrix-org#11197)). * Consider more user inputs when calculating zxcvbn score ([\matrix-org#11180](matrix-org#11180)). * GYU: Account Notification Settings ([\matrix-org#11008](matrix-org#11008)). Fixes element-hq/element-web#24567. Contributed by @justjanne. * Compound Typography pass ([\matrix-org#11103](matrix-org#11103)). Fixes element-hq/element-web#25548. * OIDC: navigate to authorization endpoint ([\matrix-org#11096](matrix-org#11096)). Fixes element-hq/element-web#25574. Contributed by @kerryarchibald. * Fix missing metaspace notification badges ([\matrix-org#11269](matrix-org#11269)). Fixes element-hq/element-web#25679. * Make checkboxes less rounded ([\matrix-org#11224](matrix-org#11224)). Contributed by @andybalaam. * GYU: Fix issues with audible keywords without activated mentions ([\matrix-org#11218](matrix-org#11218)). Contributed by @justjanne. * PosthogAnalytics unwatch settings on logout ([\matrix-org#11207](matrix-org#11207)). Fixes element-hq/element-web#25703. * Avoid trying to set room account data for pinned events as guest ([\matrix-org#11216](matrix-org#11216)). Fixes element-hq/element-web#6300. * GYU: Disable sound for DMs checkbox when DM notifications are disabled ([\matrix-org#11210](matrix-org#11210)). Contributed by @justjanne. * force to allow calls without video and audio in embedded mode ([\matrix-org#11131](matrix-org#11131)). Contributed by @EnricoSchw. * Fix room tile text clipping ([\matrix-org#11196](matrix-org#11196)). Fixes element-hq/element-web#25718. * Handle newlines in user pills ([\matrix-org#11166](matrix-org#11166)). Fixes element-hq/element-web#10994. * Limit width of user menu in space panel ([\matrix-org#11192](matrix-org#11192)). Fixes element-hq/element-web#22627. * Add isLocation to ComposerEvent analytics events ([\matrix-org#11187](matrix-org#11187)). Contributed by @andybalaam. * Fix: hide unsupported login elements ([\matrix-org#11185](matrix-org#11185)). Fixes element-hq/element-web#25711. Contributed by @kerryarchibald. * Scope smaller font size to user info panel ([\matrix-org#11178](matrix-org#11178)). Fixes element-hq/element-web#25683. * Apply i18n to strings in the html export ([\matrix-org#11176](matrix-org#11176)). * Inhibit url previews on MXIDs containing slashes same as those without ([\matrix-org#11160](matrix-org#11160)). * Make event info size consistent with state events ([\matrix-org#11181](matrix-org#11181)). * Fix markdown content spacing ([\matrix-org#11177](matrix-org#11177)). Fixes element-hq/element-web#25685. * Fix font-family definition for emojis ([\matrix-org#11170](matrix-org#11170)). Fixes element-hq/element-web#25686. * Fix spurious error sending receipt in thread errors ([\matrix-org#11157](matrix-org#11157)). * Consider the empty push rule actions array equiv to deprecated dont_notify ([\matrix-org#11155](matrix-org#11155)). Fixes element-hq/element-web#25674. * Only trap escape key for cancel reply if there is a reply ([\matrix-org#11140](matrix-org#11140)). Fixes element-hq/element-web#25640. * Update linkify to 4.1.1 ([\matrix-org#11132](matrix-org#11132)). Fixes element-hq/element-web#23806.
2 parents 8ced4f2 + 35c7df1 commit 70e1aa3

File tree

447 files changed

+8641
-2450
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

447 files changed

+8641
-2450
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ trim_trailing_whitespace = true
2424

2525
[*.{yml,yaml}]
2626
indent_size = 4
27+
28+
[*.tsx.snap]
29+
trim_trailing_whitespace = false

.github/workflows/static_analysis.yaml

-40
Original file line numberDiff line numberDiff line change
@@ -43,46 +43,6 @@ jobs:
4343
- name: Typecheck (release mode)
4444
run: "yarn run lint:types"
4545

46-
tsc-strict:
47-
name: Typescript Strict Error Checker
48-
if: github.event_name == 'pull_request'
49-
runs-on: ubuntu-latest
50-
permissions:
51-
pull-requests: read
52-
checks: write
53-
steps:
54-
- uses: actions/checkout@v3
55-
with:
56-
ref: ${{ github.event.pull_request.head.sha }}
57-
58-
- name: Install Deps
59-
run: "scripts/ci/layered.sh"
60-
61-
- name: Get diff lines
62-
id: diff
63-
uses: Equip-Collaboration/diff-line-numbers@e752977e2cb4207d671bb9e4dad18c07c1b73d52 # v1.1.0
64-
with:
65-
include: '["\\.tsx?$"]'
66-
67-
- name: Detecting files changed
68-
id: files
69-
uses: futuratrepadeira/changed-files@0239328a3a6268aad16af7c3e4efc78e32d6c0f0 # v4.0.1
70-
with:
71-
repo-token: ${{ secrets.GITHUB_TOKEN }}
72-
pattern: '^.*\.tsx?$'
73-
74-
- uses: t3chguy/typescript-check-action@main
75-
with:
76-
repo-token: ${{ secrets.GITHUB_TOKEN }}
77-
use-check: false
78-
check-fail-mode: added
79-
output-behaviour: annotate
80-
ts-extra-args: "--strict --noImplicitAny"
81-
files-changed: ${{ steps.files.outputs.files_updated }}
82-
files-added: ${{ steps.files.outputs.files_created }}
83-
files-deleted: ${{ steps.files.outputs.files_deleted }}
84-
line-numbers: ${{ steps.diff.outputs.lineNumbers }}
85-
8646
i18n_lint:
8747
name: "i18n Check"
8848
uses: matrix-org/matrix-react-sdk/.github/workflows/i18n_check.yml@develop

CHANGELOG.md

+47
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
1+
Changes in [3.76.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.76.0) (2023-07-18)
2+
=====================================================================================================
3+
4+
## 🔒 Security
5+
* Fixes for [CVE-2023-37259](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2023-37259) / [GHSA-c9vx-2g7w-rp65](https://github.com/matrix-org/matrix-react-sdk/security/advisories/GHSA-c9vx-2g7w-rp65)
6+
7+
## ✨ Features
8+
* GYU: Update banner ([\#11211](https://github.com/matrix-org/matrix-react-sdk/pull/11211)). Fixes vector-im/element-web#25530. Contributed by @justjanne.
9+
* Linkify mxc:// URLs as links to your media repo ([\#11213](https://github.com/matrix-org/matrix-react-sdk/pull/11213)). Fixes vector-im/element-web#6942.
10+
* OIDC: Log in ([\#11199](https://github.com/matrix-org/matrix-react-sdk/pull/11199)). Fixes vector-im/element-web#25657. Contributed by @kerryarchibald.
11+
* Handle all permitted url schemes in linkify ([\#11215](https://github.com/matrix-org/matrix-react-sdk/pull/11215)). Fixes vector-im/element-web#4457 and vector-im/element-web#8720.
12+
* Autoapprove Element Call oidc requests ([\#11209](https://github.com/matrix-org/matrix-react-sdk/pull/11209)). Contributed by @toger5.
13+
* Allow creating knock rooms ([\#11182](https://github.com/matrix-org/matrix-react-sdk/pull/11182)). Contributed by @charlynguyen.
14+
* feat(faq): remove keyboard shortcuts button ([\#9342](https://github.com/matrix-org/matrix-react-sdk/pull/9342)). Fixes vector-im/element-web#22625. Contributed by @gefgu.
15+
* Expose and pre-populate thread ID in devtools dialog ([\#10953](https://github.com/matrix-org/matrix-react-sdk/pull/10953)).
16+
* Hide URL preview if it will be empty ([\#9029](https://github.com/matrix-org/matrix-react-sdk/pull/9029)).
17+
* Change wording from avatar to profile picture ([\#7015](https://github.com/matrix-org/matrix-react-sdk/pull/7015)). Fixes vector-im/element-meta#1331. Contributed by @aaronraimist.
18+
* Quick and dirty devtool to explore state history ([\#11197](https://github.com/matrix-org/matrix-react-sdk/pull/11197)).
19+
* Consider more user inputs when calculating zxcvbn score ([\#11180](https://github.com/matrix-org/matrix-react-sdk/pull/11180)).
20+
* GYU: Account Notification Settings ([\#11008](https://github.com/matrix-org/matrix-react-sdk/pull/11008)). Fixes vector-im/element-web#24567. Contributed by @justjanne.
21+
* Compound Typography pass ([\#11103](https://github.com/matrix-org/matrix-react-sdk/pull/11103)). Fixes vector-im/element-web#25548.
22+
* OIDC: navigate to authorization endpoint ([\#11096](https://github.com/matrix-org/matrix-react-sdk/pull/11096)). Fixes vector-im/element-web#25574. Contributed by @kerryarchibald.
23+
24+
## 🐛 Bug Fixes
25+
* Fix missing metaspace notification badges ([\#11269](https://github.com/matrix-org/matrix-react-sdk/pull/11269)). Fixes vector-im/element-web#25679.
26+
* Make checkboxes less rounded ([\#11224](https://github.com/matrix-org/matrix-react-sdk/pull/11224)). Contributed by @andybalaam.
27+
* GYU: Fix issues with audible keywords without activated mentions ([\#11218](https://github.com/matrix-org/matrix-react-sdk/pull/11218)). Contributed by @justjanne.
28+
* PosthogAnalytics unwatch settings on logout ([\#11207](https://github.com/matrix-org/matrix-react-sdk/pull/11207)). Fixes vector-im/element-web#25703.
29+
* Avoid trying to set room account data for pinned events as guest ([\#11216](https://github.com/matrix-org/matrix-react-sdk/pull/11216)). Fixes vector-im/element-web#6300.
30+
* GYU: Disable sound for DMs checkbox when DM notifications are disabled ([\#11210](https://github.com/matrix-org/matrix-react-sdk/pull/11210)). Contributed by @justjanne.
31+
* force to allow calls without video and audio in embedded mode ([\#11131](https://github.com/matrix-org/matrix-react-sdk/pull/11131)). Contributed by @EnricoSchw.
32+
* Fix room tile text clipping ([\#11196](https://github.com/matrix-org/matrix-react-sdk/pull/11196)). Fixes vector-im/element-web#25718.
33+
* Handle newlines in user pills ([\#11166](https://github.com/matrix-org/matrix-react-sdk/pull/11166)). Fixes vector-im/element-web#10994.
34+
* Limit width of user menu in space panel ([\#11192](https://github.com/matrix-org/matrix-react-sdk/pull/11192)). Fixes vector-im/element-web#22627.
35+
* Add isLocation to ComposerEvent analytics events ([\#11187](https://github.com/matrix-org/matrix-react-sdk/pull/11187)). Contributed by @andybalaam.
36+
* Fix: hide unsupported login elements ([\#11185](https://github.com/matrix-org/matrix-react-sdk/pull/11185)). Fixes vector-im/element-web#25711. Contributed by @kerryarchibald.
37+
* Scope smaller font size to user info panel ([\#11178](https://github.com/matrix-org/matrix-react-sdk/pull/11178)). Fixes vector-im/element-web#25683.
38+
* Apply i18n to strings in the html export ([\#11176](https://github.com/matrix-org/matrix-react-sdk/pull/11176)).
39+
* Inhibit url previews on MXIDs containing slashes same as those without ([\#11160](https://github.com/matrix-org/matrix-react-sdk/pull/11160)).
40+
* Make event info size consistent with state events ([\#11181](https://github.com/matrix-org/matrix-react-sdk/pull/11181)).
41+
* Fix markdown content spacing ([\#11177](https://github.com/matrix-org/matrix-react-sdk/pull/11177)). Fixes vector-im/element-web#25685.
42+
* Fix font-family definition for emojis ([\#11170](https://github.com/matrix-org/matrix-react-sdk/pull/11170)). Fixes vector-im/element-web#25686.
43+
* Fix spurious error sending receipt in thread errors ([\#11157](https://github.com/matrix-org/matrix-react-sdk/pull/11157)).
44+
* Consider the empty push rule actions array equiv to deprecated dont_notify ([\#11155](https://github.com/matrix-org/matrix-react-sdk/pull/11155)). Fixes vector-im/element-web#25674.
45+
* Only trap escape key for cancel reply if there is a reply ([\#11140](https://github.com/matrix-org/matrix-react-sdk/pull/11140)). Fixes vector-im/element-web#25640.
46+
* Update linkify to 4.1.1 ([\#11132](https://github.com/matrix-org/matrix-react-sdk/pull/11132)). Fixes vector-im/element-web#23806.
47+
148
Changes in [3.75.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.75.0) (2023-07-04)
249
=====================================================================================================
350

cypress/e2e/crypto/crypto.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ const verify = function (this: CryptoTestContext) {
116116
// this requires creating a DM, so can take a while. Give it a longer timeout.
117117
cy.findByRole("button", { name: "Verify by emoji", timeout: 30000 }).click();
118118

119-
cy.wrap(bobsVerificationRequestPromise).then((request: VerificationRequest) => {
119+
cy.wrap(bobsVerificationRequestPromise).then(async (request: VerificationRequest) => {
120120
// the bot user races with the Element user to hit the "verify by emoji" button
121-
const verifier = request.beginKeyVerification("m.sas.v1");
121+
const verifier = await request.startVerification("m.sas.v1");
122122
doTwoWaySasVerification(verifier);
123123
});
124124
cy.findByRole("button", { name: "They match" }).click();

cypress/e2e/crypto/utils.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@ export type EmojiMapping = [emoji: string, name: string];
2828
export function waitForVerificationRequest(cli: MatrixClient): Promise<VerificationRequest> {
2929
return new Promise<VerificationRequest>((resolve) => {
3030
const onVerificationRequestEvent = async (request: VerificationRequest) => {
31-
// @ts-ignore CryptoEvent is not exported to window.matrixcs; using the string value here
32-
cli.off("crypto.verification.request", onVerificationRequestEvent);
3331
await request.accept();
3432
resolve(request);
3533
};
36-
// @ts-ignore
37-
cli.on("crypto.verification.request", onVerificationRequestEvent);
34+
// @ts-ignore CryptoEvent is not exported to window.matrixcs; using the string value here
35+
cli.once("crypto.verificationRequestReceived", onVerificationRequestEvent);
3836
});
3937
}
4038

@@ -59,7 +57,6 @@ export function handleSasVerification(verifier: Verifier): Promise<EmojiMapping[
5957

6058
// @ts-ignore as above, avoiding reference to VerifierEvent
6159
verifier.on("show_sas", onShowSas);
62-
verifier.verify();
6360
});
6461
}
6562

@@ -134,7 +131,10 @@ export function doTwoWaySasVerification(verifier: Verifier): void {
134131
cy.wrap(emojiPromise).then((emojis: EmojiMapping[]) => {
135132
cy.get(".mx_VerificationShowSas_emojiSas_block").then((emojiBlocks) => {
136133
emojis.forEach((emoji: EmojiMapping, index: number) => {
137-
expect(emojiBlocks[index].textContent.toLowerCase()).to.eq(emoji[0] + emoji[1]);
134+
// VerificationShowSas munges the case of the emoji descriptions returned by the js-sdk before
135+
// displaying them. Once we drop support for legacy crypto, that code can go away, and so can the
136+
// case-munging here.
137+
expect(emojiBlocks[index].textContent.toLowerCase()).to.eq(emoji[0] + emoji[1].toLowerCase());
138138
});
139139
});
140140
});

cypress/e2e/crypto/verification.spec.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
import type { VerificationRequest, Verifier } from "matrix-js-sdk/src/crypto-api/verification";
1818
import { CypressBot } from "../../support/bot";
1919
import { HomeserverInstance } from "../../plugins/utils/homeserver";
20-
import { emitPromise, skipIfRustCrypto } from "../../support/util";
20+
import { emitPromise } from "../../support/util";
2121
import { checkDeviceIsCrossSigned, doTwoWaySasVerification, logIntoElement, waitForVerificationRequest } from "./utils";
2222
import { getToast } from "../../support/toasts";
2323

@@ -26,7 +26,6 @@ describe("Device verification", () => {
2626
let homeserver: HomeserverInstance;
2727

2828
beforeEach(() => {
29-
skipIfRustCrypto();
3029
cy.startHomeserver("default").then((data: HomeserverInstance) => {
3130
homeserver = data;
3231

@@ -37,7 +36,7 @@ describe("Device verification", () => {
3736
cy.window({ log: false }).should("have.property", "matrixcs");
3837

3938
// Create a new device for alice
40-
cy.getBot(homeserver, { bootstrapCrossSigning: true }).then((bot) => {
39+
cy.getBot(homeserver, { rustCrypto: true, bootstrapCrossSigning: true }).then((bot) => {
4140
aliceBotClient = bot;
4241
});
4342
});
@@ -72,9 +71,9 @@ describe("Device verification", () => {
7271

7372
// Handle emoji SAS verification
7473
cy.get(".mx_InfoDialog").within(() => {
75-
cy.get<VerificationRequest>("@verificationRequest").then((request: VerificationRequest) => {
74+
cy.get<VerificationRequest>("@verificationRequest").then(async (request: VerificationRequest) => {
7675
// the bot chooses to do an emoji verification
77-
const verifier = request.beginKeyVerification("m.sas.v1");
76+
const verifier = await request.startVerification("m.sas.v1");
7877

7978
// Handle emoji request and check that emojis are matching
8079
doTwoWaySasVerification(verifier);

cypress/e2e/login/login.spec.ts

+24
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,30 @@ describe("Login", () => {
4747
// wait for the dialog to go away
4848
cy.get(".mx_ServerPickerDialog").should("not.exist");
4949

50+
cy.get(".mx_Spinner").should("not.exist");
51+
cy.get(".mx_ServerPicker_server").should("have.text", homeserver.baseUrl);
52+
53+
cy.findByRole("button", { name: "Edit" }).click();
54+
55+
// select the default server again
56+
cy.get(".mx_StyledRadioButton").first().click();
57+
cy.findByRole("button", { name: "Continue" }).click();
58+
cy.get(".mx_ServerPickerDialog").should("not.exist");
59+
cy.get(".mx_Spinner").should("not.exist");
60+
// name of default server
61+
cy.get(".mx_ServerPicker_server").should("have.text", "server.invalid");
62+
63+
// switch back to the custom homeserver
64+
65+
cy.findByRole("button", { name: "Edit" }).click();
66+
cy.findByRole("textbox", { name: "Other homeserver" }).type(homeserver.baseUrl);
67+
cy.findByRole("button", { name: "Continue" }).click();
68+
// wait for the dialog to go away
69+
cy.get(".mx_ServerPickerDialog").should("not.exist");
70+
71+
cy.get(".mx_Spinner").should("not.exist");
72+
cy.get(".mx_ServerPicker_server").should("have.text", homeserver.baseUrl);
73+
5074
cy.findByRole("textbox", { name: "Username", timeout: 15000 }).should("be.visible");
5175
// Disabled because flaky - see https://github.com/vector-im/element-web/issues/24688
5276
//cy.percySnapshot("Login");

cypress/e2e/right-panel/file-panel.spec.ts

-16
Original file line numberDiff line numberDiff line change
@@ -238,22 +238,6 @@ describe("FilePanel", () => {
238238
});
239239
});
240240
});
241-
242-
it("should not add inline padding to a tile when it is selected with right click", () => {
243-
// Upload a file
244-
uploadFile("cypress/fixtures/1sec.ogg");
245-
246-
cy.get(".mx_FilePanel .mx_RoomView_MessageList").within(() => {
247-
// Wait until the spinner of the audio player vanishes
248-
cy.get(".mx_InlineSpinner").should("not.exist");
249-
250-
// Right click the uploaded file to select the tile
251-
cy.get(".mx_EventTile").rightclick();
252-
253-
// Assert that inline padding is not applied
254-
cy.get(".mx_EventTile_selected .mx_EventTile_line").should("have.css", "padding-inline", "0px");
255-
});
256-
});
257241
});
258242

259243
describe("download", () => {

cypress/e2e/settings/appearance-user-settings-tab.spec.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ describe("Appearance user settings tab", () => {
122122
// Click the left position of the slider
123123
cy.get("input").realClick({ position: "left" });
124124

125+
const MIN_FONT_SIZE = 11;
125126
// Assert that the smallest font size is selected
126-
cy.get("input[value='13']").should("exist");
127-
cy.get("output .mx_Slider_selection_label").findByText("13");
127+
cy.get(`input[value='${MIN_FONT_SIZE}']`).should("exist");
128+
cy.get("output .mx_Slider_selection_label").findByText(MIN_FONT_SIZE);
128129
});
129130

130131
cy.get(".mx_FontScalingPanel_fontSlider").percySnapshotElement("Font size slider - smallest (13)", {
@@ -135,12 +136,13 @@ describe("Appearance user settings tab", () => {
135136
// Click the right position of the slider
136137
cy.get("input").realClick({ position: "right" });
137138

139+
const MAX_FONT_SIZE = 21;
138140
// Assert that the largest font size is selected
139-
cy.get("input[value='18']").should("exist");
140-
cy.get("output .mx_Slider_selection_label").findByText("18");
141+
cy.get(`input[value='${MAX_FONT_SIZE}']`).should("exist");
142+
cy.get("output .mx_Slider_selection_label").findByText(MAX_FONT_SIZE);
141143
});
142144

143-
cy.get(".mx_FontScalingPanel_fontSlider").percySnapshotElement("Font size slider - largest (18)", {
145+
cy.get(".mx_FontScalingPanel_fontSlider").percySnapshotElement("Font size slider - largest (21)", {
144146
widths: [486],
145147
});
146148
});

cypress/e2e/settings/hidden-rr-migration.spec.ts

-90
This file was deleted.

0 commit comments

Comments
 (0)