Skip to content

fix: set MinPasswordLength in reconfiguration setup view#371

Merged
Forceu merged 1 commit intoForceu:masterfrom
Nerahikada:fix/setup-min-password-reconfig
Mar 1, 2026
Merged

fix: set MinPasswordLength in reconfiguration setup view#371
Forceu merged 1 commit intoForceu:masterfrom
Nerahikada:fix/setup-min-password-reconfig

Conversation

@Nerahikada
Copy link
Contributor

Description

loadFromConfig() only set MinPasswordLength in the initial-setup path, so the reconfiguration UI rendered password fields with data-min=0, bypassing client-side minimum-length validation. (Found during investigation of #370.)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor / Chore

Technical Details

  • Database changes: No
  • Storage backend affected: No
  • Usage of AI: Yes - Bug investigation, fix implementation, and commit messages were assisted

How Has This Been Tested?

  • Manual Testing: Set GOKAPI_MIN_LENGTH_PASSWORD=16, ran --reconfigure, and confirmed the password field enforces 16-char minimum
  • Unit Tests: go test -tags test ./internal/configuration/setup/
  • Environment: Docker (Podman Compose), Linux

Checklist

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.

@Forceu Forceu merged commit a8baa78 into Forceu:master Mar 1, 2026
1 check passed
@Forceu
Copy link
Owner

Forceu commented Mar 1, 2026

Thank you

@Nerahikada Nerahikada deleted the fix/setup-min-password-reconfig branch March 1, 2026 13:15
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.

2 participants