From fe1cc5e149143bd78b6107ffe3f78fb369f4a64f Mon Sep 17 00:00:00 2001 From: Luca Matei Pintilie Date: Mon, 25 Jan 2021 13:43:27 +0100 Subject: Fix custom message vulnerability --- cogs/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cogs/utils.py b/cogs/utils.py index 512505f..32ef23b 100755 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -560,6 +560,8 @@ class Utils(commands.Cog): @commands.command(aliases=["calc"]) async def math(self, ctx, *, eqn: str): + if '"' in ctx.message or "print" in ctx.message: + return try: # Allow for proper absolute value notation pipes = eqn.count("|") -- cgit v1.2.3