cope
This commit is contained in:
parent
de5f99b7c8
commit
0b2fd189a5
10 changed files with 33 additions and 33 deletions
|
@ -4,7 +4,7 @@ from files.__main__ import app, limiter
|
|||
from files.helpers.const import *
|
||||
import requests
|
||||
|
||||
valid_password_regex = re.compile("^.{8,100}$")
|
||||
valid_password_regex = re.compile("^.{8,100}$", flags=re.A)
|
||||
|
||||
@app.get("/login")
|
||||
@auth_desired
|
||||
|
@ -270,10 +270,10 @@ def sign_up_post(v):
|
|||
"password") == request.values.get("password_confirm"):
|
||||
return new_signup("Passwords did not match. Please try again.")
|
||||
|
||||
if not re.fullmatch(valid_username_regex, username):
|
||||
if not re.fullmatch(valid_username_regex, username, flags=re.A):
|
||||
return new_signup("Invalid username")
|
||||
|
||||
if not re.fullmatch(valid_password_regex, request.values.get("password")):
|
||||
if not re.fullmatch(valid_password_regex, request.values.get("password"), flags=re.A):
|
||||
return new_signup("Password must be between 8 and 100 characters.")
|
||||
|
||||
email = request.values.get("email").strip().lower()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue