1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

[PM-20615] Only process incoming messages once (#14645)

* feat: start ipc client

* fix: payload serialization issues

* feat: filter incoming messages by destination

* fix: adapt to SDK renames

* feat: update sdk
This commit is contained in:
Andreas Coroiu
2025-06-12 10:17:03 +02:00
committed by GitHub
parent ed169335bf
commit 0e608639cc
6 changed files with 49 additions and 17 deletions

View File

@@ -27,7 +27,7 @@ export class WebIpcService extends IpcService {
type: "bitwarden-ipc-message",
message: {
destination: message.destination,
payload: message.payload,
payload: [...message.payload],
topic: message.topic,
},
} satisfies IpcMessage,
@@ -50,9 +50,16 @@ export class WebIpcService extends IpcService {
return;
}
this.communicationBackend?.deliver_message(
if (
typeof message.message.destination !== "object" ||
message.message.destination.Web == undefined
) {
return;
}
this.communicationBackend?.receive(
new IncomingMessage(
message.message.payload,
new Uint8Array(message.message.payload),
message.message.destination,
"BrowserBackground",
message.message.topic,