From c65256d02bdea9b5b73ffe4995e090e5ca1e7f51 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 a27fb883b1..7e5a1b0bc0 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,