fix(auth): truncate password to 72 chars to prevent bcrypt 500 error
This commit is contained in:
@@ -39,7 +39,8 @@ def hash_password(plain: str) -> str:
|
||||
|
||||
|
||||
def verify_password(plain: str, hashed: str) -> bool:
|
||||
return pwd_context.verify(plain, hashed)
|
||||
# Truncate to 72 bytes to prevent bcrypt 500 errors
|
||||
return pwd_context.verify(plain[:72], hashed)
|
||||
|
||||
|
||||
# ── JWT helpers ───────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user