Skip to content

verify_password raises UnknownHashError on malformed stored hashes instead of returning False #72

Description

@Aburke225

core/security.py lets passlib's UnknownHashError escape when the stored hash is not a recognizable format. Verification against a malformed hash should fail closed (return False), not raise.

The covering test is marked @pytest.mark.xfail referencing manifest id H-05 — remove the marker as part of the fix.

Relevant files:

  • core/security.py
  • tests/unit/test_security.py

Estimated effort: 1–2 hours

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiFastAPI backendbugSomething isn't workinggood first issueGood for newcomerstier-1Starter difficulty

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions