From 3493730e25d2e4300d84fcf61e5f86869bc4d2d0 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Mon, 18 Mar 2019 20:02:25 +0900 Subject: [PATCH] Fix custom emoji validation (#4528) --- src/misc/reaction-lib.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/reaction-lib.ts b/src/misc/reaction-lib.ts index a27fb883b..7e5a1b0bc 100644 --- a/src/misc/reaction-lib.ts +++ b/src/misc/reaction-lib.ts @@ -47,7 +47,7 @@ export async function toDbReaction(reaction: string, enableEmoji = true): Promis return normalized; } - const custom = reaction.match(/:([\w+-]+):/); + const custom = reaction.match(/^:([\w+-]+):$/); if (custom) { const emoji = await Emoji.findOne({ host: null,