(pw string)
| 559 | } |
| 560 | |
| 561 | func ValidatePassword(pw string) error { |
| 562 | |
| 563 | validation := configs.GetValidationConfig() |
| 564 | |
| 565 | if len(pw) < int(validation.PasswordSizeMin) || len(pw) > int(validation.PasswordSizeMax) { |
| 566 | return fmt.Errorf("password must be between %d and %d characters long", validation.PasswordSizeMin, validation.PasswordSizeMax) |
| 567 | } |
| 568 | |
| 569 | return nil |
| 570 | } |
| 571 | |
| 572 | // CharacterNameSearch returns the userId and username for the given character |
| 573 | // name. It consults the in-memory CharacterIndex, which is populated at startup |
no test coverage detected