Supporting change for CVE-2024-47771 / GHSA-963w-49j9-gxj6

pull/28194/head
David Baker 2024-10-15 12:38:16 +01:00
parent bc0ae8de14
commit 80018bccff
2 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,7 @@ type ElectronChannel =
| "userDownloadAction" | "userDownloadAction"
| "openDesktopCapturerSourcePicker" | "openDesktopCapturerSourcePicker"
| "userAccessToken" | "userAccessToken"
| "homeserverUrl"
| "serverSupportedVersions"; | "serverSupportedVersions";
declare global { declare global {

View File

@ -126,6 +126,11 @@ export default class ElectronPlatform extends VectorBasePlatform {
window.electron!.send("userAccessToken", MatrixClientPeg.get()?.getAccessToken()); window.electron!.send("userAccessToken", MatrixClientPeg.get()?.getAccessToken());
}); });
// `homeserverUrl` (IPC) is requested by the main process. A reply is sent over the same channel.
window.electron.on("homeserverUrl", () => {
window.electron!.send("homeserverUrl", MatrixClientPeg.get()?.getHomeserverUrl());
});
// `serverSupportedVersions` is requested by the main process when it needs to know if the // `serverSupportedVersions` is requested by the main process when it needs to know if the
// server supports a particular version. This is primarily used to detect authenticated media // server supports a particular version. This is primarily used to detect authenticated media
// support. A reply is sent over the same channel. // support. A reply is sent over the same channel.