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] Able to react with invalid emoji #8667

Merged
merged 6 commits into from
Mar 15, 2018

Conversation

mutdmour
Copy link
Contributor

[FIX] For bug fixes

@RocketChat/core

Closes #8336

Added verification to check if emoji is regular or custom

@CLAassistant
Copy link

CLAassistant commented Oct 26, 2017

CLA assistant check
All committers have signed the CLA.

@mutdmour mutdmour changed the title fixed issue #8336 [Able to react with invalid emoji] [Fix] Able to react with invalid emoji #8336 Oct 27, 2017
Copy link
Contributor

@graywolf336 graywolf336 left a 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' });
Copy link
Contributor

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.?

@graywolf336 graywolf336 added this to the 0.62.0 milestone Feb 6, 2018
@rodrigok rodrigok changed the title [Fix] Able to react with invalid emoji #8336 [FIX] Able to react with invalid emoji Feb 17, 2018
@theorenck theorenck modified the milestones: 0.62.0, 0.63.0 Feb 20, 2018
@rodrigok rodrigok merged commit c20f3fd into RocketChat:develop Mar 15, 2018
@rodrigok rodrigok mentioned this pull request Apr 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Able to react with invalid emoji
6 participants