Skip to content

Drop zxcvbn password dependency#163

Open
alexandreNoens wants to merge 1 commit into
masterfrom
feat-121-drop-zxcvbn
Open

Drop zxcvbn password dependency#163
alexandreNoens wants to merge 1 commit into
masterfrom
feat-121-drop-zxcvbn

Conversation

@alexandreNoens

Copy link
Copy Markdown

zxcvbn adds a large embedded dictionary to formol.js. For issue #121, this dependency represented about 823 kB and a significant part of the client bundle.

Replace zxcvbn scoring in PasswordStrengthField with an internal password-strength utility based on:

  • length bounds (min and max)
  • repeated character detection
  • sequential and keyboard pattern detection
  • email-like input detection
  • entropy thresholds mapped to scores 0..4

Update defaults to minLength=8 and maxLength=64, remove userInputs from the scoring path, and add focused tests for both the new helper and the password-strength field behavior.

Side effects: password scores can differ from previous zxcvbn results, especially for edge cases, but validation flow is preserved while reducing bundle size.

Close #121

zxcvbn adds a large embedded dictionary to formol.js.
For issue #121, this dependency represented about 823 kB and a
significant part of the client bundle.

Replace zxcvbn scoring in PasswordStrengthField with an internal
password-strength utility based on:
- length bounds (min and max)
- repeated character detection
- sequential and keyboard pattern detection
- email-like input detection
- entropy thresholds mapped to scores 0..4

Update defaults to minLength=8 and maxLength=64, remove userInputs from
the scoring path, and add focused tests for both the new helper and the
password-strength field behavior.

Side effects: password scores can differ from previous zxcvbn results,
especially for edge cases, but validation flow is preserved while
reducing bundle size.

Resolves: #121
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.

Reconsider dependency to zxcvbn due to its size

1 participant