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. |
||
|---|---|---|
| .. | ||
| api | ||
| auth | ||
| web | ||
| __init__.py | ||
| instance_config.py | ||
| main.py | ||