Skip to content

Detect compromised passwords via Have I Been Pwned#951

Draft
danielcompton wants to merge 1 commit into
mainfrom
danielcompton/pwned-password-reset
Draft

Detect compromised passwords via Have I Been Pwned#951
danielcompton wants to merge 1 commit into
mainfrom
danielcompton/pwned-password-reset

Conversation

@danielcompton

Copy link
Copy Markdown
Member

Closes #725. Passwords are checked against the HIBP Pwned Passwords range API (k-anonymity — only the first 5 chars of the SHA-1 hash leave the app) on registration, password change, and reset (rejecting compromised passwords up front), and on login. A login with a known-compromised password clears the stored password, emails the user, and forces them through the forgot-password flow before they can log in again. The new clojars.hibp client fails open on errors and short-timeouts so a third-party outage can't lock users out, and the length-bounded validation guard avoids an HTTP call for passwords that fail length checks anyway. Wired in via a new :hibp system component (real + mock) with unit and integration test coverage.

🤖 Generated with Claude Code

Check passwords against the HIBP Pwned Passwords range API (k-anonymity:
only the first 5 chars of the SHA-1 hash leave the app) on registration,
password change, and reset, and on login. A login with a known-compromised
password clears the stored password, emails the user, and forces them
through the forgot-password flow before they can log in again. The HIBP
client fails open on errors so a third-party outage can't lock users out.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect and disable weak or compromised passwords

1 participant