Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions plugins/credential-password/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import "github.com/thecodearcher/limen"

const (
defaultMinPasswordLength = 8
minAllowedPasswordLength = 4
defaultPasswordRequireUppercase = true
defaultPasswordRequireNumbers = true
defaultPasswordRequireSymbols = false
Expand Down
4 changes: 2 additions & 2 deletions plugins/credential-password/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ func (p *credentialPasswordPlugin) Initialize(core *limen.LimenCore) error {
return fmt.Errorf("config is required")
}

if p.config.passwordMinLength < defaultMinPasswordLength {
return fmt.Errorf("password min length must be at least 4")
if p.config.passwordMinLength < minAllowedPasswordLength {
return fmt.Errorf("password min length must be at least %d", minAllowedPasswordLength)
}

return nil
Expand Down