Previously the password check was gated on both user.password_hash and request.password being truthy, so an attacker could omit the password field (which defaults to "") and receive a valid JWT. Now any user with a stored hash must supply a non-empty password that passes argon2 verification. Adds six TestTokenEndpoint tests covering empty, missing, wrong, and correct password, plus no-hash user and unknown user cases. |
||
|---|---|---|
| .. | ||
| providers | ||
| __init__.py | ||
| dependencies.py | ||
| jwt.py | ||
| router.py | ||