[PR #5998] [MERGED] fix(haveibeenpwned): check for limited set of paths #6373

Closed
opened 2026-03-13 12:56:24 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5998
Author: @Bekacru
Created: 11/15/2025
Status: Merged
Merged: 11/15/2025
Merged by: @Bekacru

Base: canaryHead: fix/password


📝 Commits (5)

📊 Changes

1 file changed (+21 additions, -3 deletions)

View changed files

📝 packages/better-auth/src/plugins/haveibeenpwned/index.ts (+21 -3)

📄 Description

Summary by cubic

Limit Have I Been Pwned checks to specific auth routes to avoid unnecessary lookups and improve performance. By default, checks run only on /sign-up/email, /change-password, and /reset-password.

  • New Features

    • Added paths option to configure which routes trigger the password breach check.
    • Keeps customPasswordCompromisedMessage support.
  • Bug Fixes

    • Run checks only when the current request path matches the whitelist (via getCurrentAuthContext).
    • Prevents unintended checks during unrelated hashing, reducing external calls and false positives.

Written for commit 0ccc4946c3. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/5998 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 11/15/2025 **Status:** ✅ Merged **Merged:** 11/15/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/password` --- ### 📝 Commits (5) - [`c7fc082`](https://github.com/better-auth/better-auth/commit/c7fc082f621628eba9b5f932ec12baba76098579) fix(have-ibeen-pwned): only check for limited set of paths - [`4297def`](https://github.com/better-auth/better-auth/commit/4297def36930c90e49d8369403997a8cf2588fb9) chore: lint - [`479aa75`](https://github.com/better-auth/better-auth/commit/479aa754b056dec5d2a3f4ddaf1ee5036db364b3) chore: update defualt - [`8d1f725`](https://github.com/better-auth/better-auth/commit/8d1f725e71008ee920c6f79838db08782dd3fd3a) allow override - [`0ccc494`](https://github.com/better-auth/better-auth/commit/0ccc4946c3e88fc4431f4f7fee78738055c4bf2e) chore: lint ### 📊 Changes **1 file changed** (+21 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/haveibeenpwned/index.ts` (+21 -3) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Limit Have I Been Pwned checks to specific auth routes to avoid unnecessary lookups and improve performance. By default, checks run only on /sign-up/email, /change-password, and /reset-password. - **New Features** - Added paths option to configure which routes trigger the password breach check. - Keeps customPasswordCompromisedMessage support. - **Bug Fixes** - Run checks only when the current request path matches the whitelist (via getCurrentAuthContext). - Prevents unintended checks during unrelated hashing, reducing external calls and false positives. <sup>Written for commit 0ccc4946c3e88fc4431f4f7fee78738055c4bf2e. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 12:56:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#6373