1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-08 20:50:28 +00:00

fix: old IPC invalidating session when receiving framework message

This commit is contained in:
Andreas Coroiu
2025-10-20 10:50:02 +02:00
parent 019c2f727b
commit bf1ac80e65

View File

@@ -122,6 +122,11 @@ export class BiometricMessageHandlerService {
async handleMessage(msg: LegacyMessageWrapper) {
const { appId, message: rawMessage } = msg as LegacyMessageWrapper;
if (!("appId" in msg)) {
this.logService.debug("[Native Messaging IPC] Unknown message format. Ignoring.");
return;
}
// Request to setup secure encryption
if ("command" in rawMessage && rawMessage.command === "setupEncryption") {
if (rawMessage.publicKey == null || rawMessage.userId == null) {
@@ -166,6 +171,7 @@ export class BiometricMessageHandlerService {
if (sessionSecret == null) {
this.logService.info(
"[Native Messaging IPC] Session secret for secure channel is missing. Invalidating encryption...",
msg,
);
ipc.platform.nativeMessaging.sendMessage({
command: "invalidateEncryption",