From 65cd5c93cc30c56a8172c5c7fdda7ebc15dfd101 Mon Sep 17 00:00:00 2001 From: ericthelemur Date: Sun, 5 Mar 2023 16:41:02 +0000 Subject: [PATCH] Allow underscores in competition name --- progcomp/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/progcomp/routes.py b/progcomp/routes.py index 815e4d8..354121f 100644 --- a/progcomp/routes.py +++ b/progcomp/routes.py @@ -73,7 +73,7 @@ def verify_input(inp: Optional[str], max_len: int = 100) -> bool: or inp == "" or inp.isspace() or len(inp) > max_len - or not inp.isalnum() + or not re.match(r"^[A-Za-z0-9_]+$", inp) ) @@ -275,7 +275,7 @@ def leaderboard(p_name, p_set) -> FlaskResponse: if ( not pc.show_leaderboard or not re.match(r"^[A-Za-z0-9_]+$", p_name) - or not re.match(r"^[A-Za-z0-9_]+$", p_name) + or not re.match(r"^[A-Za-z0-9_]+$", p_set) ): return redirect(url_for("progcomp.menu"))