From 8cbe37427147ea4b94fc410c1372f4a491d92761 Mon Sep 17 00:00:00 2001 From: iliya Date: Mon, 9 Mar 2026 19:18:18 +0200 Subject: [PATCH] fix: add fromMember validation in CrossTeamService Prevent empty or missing fromMember values from being accepted in cross-team message requests. --- src/main/services/team/CrossTeamService.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/services/team/CrossTeamService.ts b/src/main/services/team/CrossTeamService.ts index 846fa431..327cefd6 100644 --- a/src/main/services/team/CrossTeamService.ts +++ b/src/main/services/team/CrossTeamService.ts @@ -52,6 +52,9 @@ export class CrossTeamService { if (fromTeam === toTeam) { throw new Error('Cannot send cross-team message to the same team'); } + if (!fromMember || typeof fromMember !== 'string' || fromMember.trim().length === 0) { + throw new Error('fromMember is required'); + } if (!text || typeof text !== 'string' || text.trim().length === 0) { throw new Error('Message text is required'); }