Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: File Upload description bypassing message maximum character limit setting #33218

Merged
merged 13 commits into from
Nov 18, 2024

Conversation

MartinSchoeler
Copy link
Contributor

@MartinSchoeler MartinSchoeler commented Sep 5, 2024

Proposed changes (including videos or screenshots)

Added the message character limit restriction to the file upload description field, before this, you could send a message bigger than the limit by sending a file with a large description

Issue(s)

SUP-620

Copy link
Contributor

dionisio-bot bot commented Sep 5, 2024

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

Copy link

changeset-bot bot commented Sep 5, 2024

🦋 Changeset detected

Latest commit: 2babbb1

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

This PR includes changesets to release 37 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/i18n Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-voip Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings 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/model-typings 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/network-broker Patch
@rocket.chat/models 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

Copy link

codecov bot commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.90%. Comparing base (b56d4c5) to head (2babbb1).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##           develop   #33218       +/-   ##
============================================
- Coverage    75.18%   58.90%   -16.29%     
============================================
  Files          495     2794     +2299     
  Lines        21600    66737    +45137     
  Branches      5362    15003     +9641     
============================================
+ Hits         16241    39314    +23073     
- Misses        4717    24608    +19891     
- Partials       642     2815     +2173     
Flag Coverage Δ
unit 75.18% <ø> (ø)

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

Copy link
Contributor

github-actions bot commented Sep 19, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-33218/
on branch gh-pages at 2024-11-18 13:19 UTC

@MartinSchoeler MartinSchoeler marked this pull request as ready for review September 19, 2024 14:55
@MartinSchoeler MartinSchoeler requested a review from a team as a code owner September 19, 2024 14:55
Copy link
Member

@abhinavkrin abhinavkrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @MartinSchoeler,

Would it be a good idea to implement the check on the backend as well? Currently, users can send long messages through the API bypassing the character limit.

@MartinSchoeler MartinSchoeler force-pushed the file-description-char-limit branch from 033721e to e44659c Compare October 8, 2024 17:37
@MartinSchoeler MartinSchoeler force-pushed the file-description-char-limit branch from e44659c to 2d32fd6 Compare October 9, 2024 13:35
@MartinSchoeler MartinSchoeler requested a review from a team as a code owner October 9, 2024 13:35
@MartinSchoeler MartinSchoeler force-pushed the file-description-char-limit branch 2 times, most recently from e8a5274 to 44f84b8 Compare October 11, 2024 12:52
@MartinSchoeler MartinSchoeler force-pushed the file-description-char-limit branch from 44f84b8 to 3558dc9 Compare October 11, 2024 13:38
@MartinSchoeler MartinSchoeler dismissed abhinavkrin’s stale review October 22, 2024 16:56

Could you review again? Added the changes that were requested, thanks!

abhinavkrin
abhinavkrin previously approved these changes Oct 22, 2024
tiagoevanp
tiagoevanp previously approved these changes Oct 22, 2024
Copy link
Member

@gabriellsh gabriellsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title should describe the issue and not the solution. I'll change that for you.

.changeset/lemon-foxes-carry.md Outdated Show resolved Hide resolved
apps/meteor/tests/e2e/file-upload.spec.ts Outdated Show resolved Hide resolved
packages/i18n/src/locales/en.i18n.json Outdated Show resolved Hide resolved
@gabriellsh gabriellsh changed the title fix: Apply message character limit to file upload description fix: File Upload description bypassing message maximum character limit setting Oct 22, 2024
@MartinSchoeler MartinSchoeler dismissed stale reviews from tiagoevanp and abhinavkrin via a7da7b5 October 23, 2024 17:44
@MartinSchoeler MartinSchoeler added this to the 7.1.0 milestone Oct 23, 2024
gabriellsh
gabriellsh previously approved these changes Oct 24, 2024
Copy link
Member

@MarcosSpessatto MarcosSpessatto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add some UI tests?

apps/meteor/tests/e2e/file-upload.spec.ts Show resolved Hide resolved
apps/meteor/app/api/server/v1/rooms.ts Outdated Show resolved Hide resolved
@scuciatto scuciatto added the stat: QA assured Means it has been tested and approved by a company insider label Nov 12, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Nov 12, 2024
Copy link
Member

@dougfabris dougfabris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work here!

@kodiakhq kodiakhq bot merged commit 6c83bf0 into develop Nov 18, 2024
45 of 46 checks passed
@kodiakhq kodiakhq bot deleted the file-description-char-limit branch November 18, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants