Skip to content

Expand commonPasswordBaseWords with common weak passwords - #899

Open
iamtanuj18 wants to merge 4 commits into
devfrom
889-add-common-password-base-words
Open

Expand commonPasswordBaseWords with common weak passwords#899
iamtanuj18 wants to merge 4 commits into
devfrom
889-add-common-password-base-words

Conversation

@iamtanuj18

@iamtanuj18 iamtanuj18 commented Jul 29, 2026

Copy link
Copy Markdown

Fixes #889

Expands commonPasswordBaseWords from 3 to 65 entries. Sources are aggregated from Wikipedia's List of the most common passwords, which pulls from NordPass, SplashData, Keeper, NCSC/HIBP, and Huntress top-password reports.

  • Union across all cited sources with case-insensitive deduplication (the regex uses the 'i' flag)
  • Word entries in Title Case to match existing convention
  • Entries under 5 characters excluded to avoid false positives on longer passwords containing the substring
  • Grouped with category comments for maintainability

Also updates the error message in PasswordStrength.ts to show the specific matched pattern instead of listing all 65 blocked words. The previous join(', ') format would produce a wall of text with the expanded list. This addresses the "user-facing guidance" point flagged in the issue. Cypress assertions in admin-client/passwordReset.cy.js and user-client/registration.cy.js updated to match.

Test admin passwords updated from Loginforadmin1Loginfortests123 because admin is now in the blocklist and broke backend integration tests. TestUsers is test-only, no prod/env impact.

The admin test users all used 'Loginforadmin1' which now contains
'admin' as a blocked substring after this PR's blocklist expansion,
causing integration tests to fail on registration. Switched to
'Loginfortests123' which matches the pattern already used by other
tests and passes all current checks.
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.

1 participant