From 7a529e70f898a2710564c3277e04b849156127d2 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 1 Jan 2023 02:58:37 +0200 Subject: [PATCH] disallow chudding and banning ppl for negative days --- files/routes/admin.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/files/routes/admin.py b/files/routes/admin.py index 4bbf67634..e8cd15440 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1018,6 +1018,9 @@ def ban_user(id, v): except: pass + if days < 0: + abort(400, "You can't bans people for negative days!") + reason = request.values.get("reason", "").strip()[:256] if not reason: @@ -1099,6 +1102,9 @@ def agendaposter(id, v): except: pass + if days < 0: + abort(400, "You can't chud people for negative days!") + reason = request.values.get("reason", "").strip() reason = filter_emojis_only(reason)