-
Notifications
You must be signed in to change notification settings - Fork 13.1k
fix: avoid to get files with other extensions than the proper ones for custom-sounds and emoji-custom endpoints #38531
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
base: develop
Are you sure you want to change the base?
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: d9b8d60 The changes in this PR will be included in the next version bump. This PR includes changesets to release 40 packages
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 |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #38531 +/- ##
===========================================
+ Coverage 70.39% 70.40% +0.01%
===========================================
Files 3162 3162
Lines 110650 110650
Branches 19862 19896 +34
===========================================
+ Hits 77891 77906 +15
+ Misses 30727 30718 -9
+ Partials 2032 2026 -6
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Proposed changes (including videos or screenshots)
I propose fetching the file first and validating the
contentTypeattribute matches the kind of the requested resource (e.g image, audio). I thought about validating by file extensions (mp3 for audio, png for emojis), but that might lead to scenarios where previous files with different extensions where uploaded because at a certain point in Rocket.Chat they were allowed, and if we don't include them then when the user fetches them, they'll get an error. So I determined this is the most backwards-compatible approach.Issue(s)
CORE-1805 Improve how custom-sounds and emoji-custom endpoints get files
Steps to test or reproduce
Further comments