Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

fix: incoming webhook message not respecting Message_MaxAllowedSize setting

Open abhinavkrin opened this issue 9 months ago • 5 comments

Proposed changes (including videos or screenshots)

This PR fixes an issue where incoming webhook messages could exceed the allowed characters per message setting.

Issue(s)

Steps to test or reproduce

Further comments

Closes SUP-796

abhinavkrin avatar Jun 05 '25 17:06 abhinavkrin

Looks like this PR is ready to merge! 🎉 If you have any trouble, please check the PR guidelines

dionisio-bot[bot] avatar Jun 05 '25 17:06 dionisio-bot[bot]

A potentially more appropriate place for this validation could be within the sendMessage function (apps/meteor/app/lib/server/functions/sendMessage.ts). However, applying the check there might introduce regressions in scenarios where bypassing this limit is intentional or required by existing implementations. Need a second opinion on this.

Note: This refers to the sendMessage function, not the sendMessage method (apps/meteor/app/lib/server/methods/sendMessage.ts), which already enforces this setting.

abhinavkrin avatar Jun 05 '25 17:06 abhinavkrin

PR Preview Action v1.6.1 :---: |

:rocket: View preview at
https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-36163/

|
Built to branch gh-pages at 2025-06-16 13:14 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

github-actions[bot] avatar Jun 05 '25 17:06 github-actions[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 64.45%. Comparing base (b1d3fff) to head (d9789a6). Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #36163      +/-   ##
===========================================
+ Coverage    64.43%   64.45%   +0.02%     
===========================================
  Files         3138     3138              
  Lines       104920   104920              
  Branches     19784    19784              
===========================================
+ Hits         67601    67628      +27     
+ Misses       34631    34610      -21     
+ Partials      2688     2682       -6     
Flag Coverage Δ
e2e 57.68% <ø> (+0.05%) :arrow_up:
unit 69.05% <ø> (+0.03%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Jun 05 '25 17:06 codecov[bot]

🦋 Changeset detected

Latest commit: d9789a60b6120cd324f3de11c8342be52943d196

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 36 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Jun 16 '25 12:06 changeset-bot[bot]