Skip to content

Commit a9bb7e8

Browse files
Khizarshah01kodiakhq[bot]KevLehmanggazzo
authored andcommitted
fix: limit omnichannel webhook response size (#38944)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Kevin Aleman <kaleman960@gmail.com> Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz>
1 parent bf9b802 commit a9bb7e8

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

.changeset/tender-papayas-jam.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+
Limits Omnichannel webhook maximum response size to 10mb.

apps/meteor/app/livechat/server/api/v1/webhooks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ API.v1.addRoute(
6666
body: sampleData,
6767
// SECURITY: Webhooks can only be configured by users with enough privileges. It's ok to disable this check here.
6868
ignoreSsrfValidation: true,
69+
size: 10 * 1024 * 1024,
6970
} as ExtendedFetchOptions;
7071

7172
const webhookUrl = settings.get<string>('Livechat_webhookUrl');

apps/meteor/app/livechat/server/lib/webhooks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export async function sendRequest(
2929
timeout,
3030
// SECURITY: Webhooks can only be configured by users with enough privileges. It's ok to disable this check here.
3131
ignoreSsrfValidation: true,
32+
size: 10 * 1024 * 1024,
3233
});
3334

3435
if (result.status === 200) {

0 commit comments

Comments
 (0)