From ec5245cd1c1bd1cdce89154fa0b9bf1b6740f403 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 11 Nov 2021 10:35:05 +0000 Subject: [PATCH] Check for invalid characters in emoji reactions --- reaction.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reaction.py b/reaction.py index 09b6a8598..536dbc06e 100644 --- a/reaction.py +++ b/reaction.py @@ -30,6 +30,7 @@ from utils import loadJson from utils import saveJson from utils import removePostFromCache from utils import getCachedPostFilename +from utils import containsInvalidChars from posts import sendSignedJson from session import postJson from webfinger import webfingerHandle @@ -54,6 +55,8 @@ def validEmojiContent(emojiContent: str) -> bool: return False if len(emojiRegex.findall(emojiContent)) == 0: return False + if containsInvalidChars(emojiContent): + return False return True