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)