Skip to content

Commit 80018bc

Browse files
committed
Supporting change for CVE-2024-47771 / GHSA-963w-49j9-gxj6
1 parent bc0ae8d commit 80018bc

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/@types/global.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ type ElectronChannel =
2626
| "userDownloadAction"
2727
| "openDesktopCapturerSourcePicker"
2828
| "userAccessToken"
29+
| "homeserverUrl"
2930
| "serverSupportedVersions";
3031

3132
declare global {

src/vector/platform/ElectronPlatform.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ export default class ElectronPlatform extends VectorBasePlatform {
126126
window.electron!.send("userAccessToken", MatrixClientPeg.get()?.getAccessToken());
127127
});
128128

129+
// `homeserverUrl` (IPC) is requested by the main process. A reply is sent over the same channel.
130+
window.electron.on("homeserverUrl", () => {
131+
window.electron!.send("homeserverUrl", MatrixClientPeg.get()?.getHomeserverUrl());
132+
});
133+
129134
// `serverSupportedVersions` is requested by the main process when it needs to know if the
130135
// server supports a particular version. This is primarily used to detect authenticated media
131136
// support. A reply is sent over the same channel.

0 commit comments

Comments
 (0)