diff --git a/files/routes/login.py b/files/routes/login.py index e8a63a14e..981d7c7e5 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -268,10 +268,10 @@ def sign_up_post(v): "password") == request.values.get("password_confirm"): return new_signup("Passwords did not match. Please try again.") - if not valid_username_regex.fullmatch(username, flags=re.A): + if not valid_username_regex.fullmatch(username): return new_signup("Invalid username") - if not valid_password_regex.fullmatch(request.values.get("password"), flags=re.A): + if not valid_password_regex.fullmatch(request.values.get("password")): return new_signup("Password must be between 8 and 100 characters.") email = request.values.get("email").strip().lower() diff --git a/files/routes/settings.py b/files/routes/settings.py index 0da71bbe3..2e49d8f28 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -532,7 +532,7 @@ def settings_security_post(v): if request.values.get("new_password") != request.values.get("cnf_password"): return render_template("settings_security.html", v=v, error="Passwords do not match.") - if not valid_password_regex.fullmatch(request.values.get("new_password"), flags=re.A): + if not valid_password_regex.fullmatch(request.values.get("new_password")): return render_template("settings_security.html", v=v, error="Password must be between 8 and 100 characters.") if not v.verifyPass(request.values.get("old_password")): @@ -859,7 +859,7 @@ def settings_name_change(v): v=v, error="You didn't change anything") - if not valid_username_regex.fullmatch(new_name, flags=re.A): + if not valid_username_regex.fullmatch(new_name): return render_template("settings_profile.html", v=v, error="This isn't a valid username.") diff --git a/files/routes/subs.py b/files/routes/subs.py index 7b1fbd12a..caf3819f3 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -273,7 +273,7 @@ def create_sub2(v): if not name: abort(400) name = name.strip().lower() - if not valid_sub_regex.fullmatch(name, flags=re.A): + if not valid_sub_regex.fullmatch(name): return render_template("sub/create_sub.html", v=v, error="Sub name not allowed."), 400 sub = g.db.query(Sub).filter_by(name=name).one_or_none()