forbid slots in ping group names

pull/136/head
Aevann 2023-03-04 23:45:12 +02:00
parent f10c8b0db8
commit 6162d02ca3
1 changed files with 3 additions and 0 deletions

View File

@ -25,6 +25,9 @@ def create_group(v):
if not name: abort(400)
name = name.strip().lower()
if name.startswith('slots'):
return redirect(f"/ping_groups?error=You can't make a group with that name!")
if not valid_sub_regex.fullmatch(name):
return redirect(f"/ping_groups?error=Name does not match the required format!")