Skip to content

fix(credential-password): allow password min length below default 8 - #31

Open
sayem314 wants to merge 2 commits into
thecodearcher:masterfrom
sayem314:fix/credential-password-min-length
Open

fix(credential-password): allow password min length below default 8#31
sayem314 wants to merge 2 commits into
thecodearcher:masterfrom
sayem314:fix/credential-password-min-length

Conversation

@sayem314

Copy link
Copy Markdown

Refs #30

Initialize compared the configured password min length against
defaultMinPasswordLength (8) while the error message claimed a floor of 4,
so valid lower values like WithPasswordMinLength(6) were rejected.

  • Add minAllowedPasswordLength (4) as the true absolute floor, distinct
    from the default of 8
  • Validate the configured value against that floor, accepting length >= 4
  • Format the error message with the actual constant instead of a
    hardcoded "4"

Default behavior (8) is unchanged.

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