Skip to content

Commit c48eb68

Browse files
authored
fix: remove sensitive information from outgoingLogger logs (#37729)
1 parent 4182a7b commit c48eb68

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

.changeset/thick-wasps-turn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@rocket.chat/meteor': patch
3+
---
4+
5+
Fixes inconsistency in roomLeft event payload by aligning it to the standard outgoing events signature.

.changeset/tricky-trees-tan.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@rocket.chat/meteor': patch
3+
---
4+
5+
Removes sensitive data from outgoing events debug logs.

apps/meteor/app/integrations/server/lib/triggerHandler.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,17 @@ class RocketChatIntegrationHandler {
216216
}
217217
break;
218218
case 'roomJoined':
219-
case 'roomLeft':
220219
if (args.length >= 3) {
221220
argObject.user = args[1] as IUser;
222221
argObject.room = args[2] as IRoom;
223222
}
224223
break;
224+
case 'roomLeft':
225+
if (args.length >= 3) {
226+
argObject.user = (args[1] as { user: IUser })?.user;
227+
argObject.room = args[2] as IRoom;
228+
}
229+
break;
225230
case 'userCreated':
226231
if (args.length >= 2) {
227232
argObject.user = args[1] as IUser;
@@ -235,7 +240,9 @@ class RocketChatIntegrationHandler {
235240

236241
outgoingLogger.debug({
237242
msg: `Got the event arguments for the event: ${argObject.event}`,
238-
argObject,
243+
messageId: argObject.message?._id,
244+
roomId: argObject.room?._id,
245+
userId: argObject.user?._id || argObject.owner?._id,
239246
});
240247

241248
return argObject;

0 commit comments

Comments
 (0)