diff --git a/backend/auth/dependencies.py b/backend/auth/dependencies.py index 91a2ebd0..598dedcf 100644 --- a/backend/auth/dependencies.py +++ b/backend/auth/dependencies.py @@ -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 ───────────────────────────────────────────────────────────────