Skip to content

Commit

Permalink
Merge pull request #6405 from Juneezee/fix/hash-validate-comparison
Browse files Browse the repository at this point in the history
util: Compare password hashing method with `strings.EqualFold`
  • Loading branch information
adriansmares authored Jul 25, 2023
2 parents d068363 + 3c7d5fc commit d0d9f5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/auth/password.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func Validate(hashed, plain string) (bool, error) {
typ := parts[0]

for _, method := range hashValidators {
if strings.ToLower(typ) == strings.ToLower(method.Name()) {
if strings.EqualFold(typ, method.Name()) {
return method.Validate(hashed, plain)
}
}
Expand Down

0 comments on commit d0d9f5f

Please sign in to comment.