master
Aevann1 2022-02-26 22:13:34 +02:00
parent 2dc16548a4
commit eb72792b44
3 changed files with 5 additions and 5 deletions

View File

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

View File

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

View File

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