disallow chudding and banning ppl for negative days

pull/83/head
Aevann 2023-01-01 02:58:37 +02:00
parent 834de4bcf0
commit 7a529e70f8
1 changed files with 6 additions and 0 deletions

View File

@ -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)