-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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] Able to react with invalid emoji #8667
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the submission!
@@ -17,6 +17,10 @@ Meteor.methods({ | |||
throw new Meteor.Error('error-not-allowed', 'Not allowed', { method: 'setReaction' }); | |||
} | |||
|
|||
if (!RocketChat.emoji.list[reaction] && RocketChat.models.EmojiCustom.findByNameOrAlias(reaction).count() === 0) { | |||
throw new Meteor.Error('error-not-allowed', 'Not allowed', { method: 'setReaction' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is an older pull request, do you mind changing this to be error-invalid-emoji
and the text be Invalid emoji provided.
?
[FIX] For bug fixes
@RocketChat/core
Closes #8336
Added verification to check if emoji is regular or custom