aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Matei Pintilie <lucafulger@gmail.com>2021-01-25 12:43:27 +0000
committerGitHub <noreply@github.com>2021-01-25 12:43:27 +0000
commitfe1cc5e149143bd78b6107ffe3f78fb369f4a64f (patch)
treecc74165f4807b52ef17aeac2e85896e35af6c82e
parentc0b82d97484ffff0c1a9c6694ef39385ae794bc8 (diff)
downloadsteve-bot-fe1cc5e149143bd78b6107ffe3f78fb369f4a64f.tar
steve-bot-fe1cc5e149143bd78b6107ffe3f78fb369f4a64f.tar.gz
steve-bot-fe1cc5e149143bd78b6107ffe3f78fb369f4a64f.tar.bz2
steve-bot-fe1cc5e149143bd78b6107ffe3f78fb369f4a64f.tar.lz
steve-bot-fe1cc5e149143bd78b6107ffe3f78fb369f4a64f.tar.xz
steve-bot-fe1cc5e149143bd78b6107ffe3f78fb369f4a64f.tar.zst
steve-bot-fe1cc5e149143bd78b6107ffe3f78fb369f4a64f.zip
Fix custom message vulnerability
-rwxr-xr-xcogs/utils.py2
1 files changed, 2 insertions, 0 deletions
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("|")