feat(auth): support change password

This commit is contained in:
MingxuanGame
2025-10-07 13:07:14 +00:00
parent 95f7c010af
commit 60049a777f
3 changed files with 68 additions and 14 deletions

View File

@@ -60,6 +60,20 @@ def validate_username(username: str) -> list[str]:
return errors
def validate_password(password: str) -> list[str]:
"""验证密码"""
errors = []
if not password:
errors.append("Password is required")
return errors
if len(password) < 8:
errors.append("Password must be at least 8 characters long")
return errors
def verify_password_legacy(plain_password: str, bcrypt_hash: str) -> bool:
"""
验证密码 - 使用 osu! 的验证方式