This commit is contained in:
UnitedAirforce
2025-02-22 08:49:36 +08:00
parent 572dfcf301
commit 8ae153c2d6

View File

@@ -211,7 +211,7 @@ def hash_password(password):
return hashed_password return hashed_password
def verify_password(password, hashed_password): def verify_password(password, hashed_password):
return bcrypt.checkpw(password.encode('utf-8'), hashed_password) return bcrypt.checkpw(password.encode('utf-8'), hashed_password.encode('utf-8'))
def is_alphanumeric(username): def is_alphanumeric(username):
pattern = r"^[a-zA-Z0-9]+$" pattern = r"^[a-zA-Z0-9]+$"