Automatic Merge
Этот коммит содержится в:
Alejandro García Montoro
2026-01-27 07:53:29 +01:00
коммит произвёл GitHub
родитель 51f2e2fdd5
Коммит 0655a63354
2 изменённых файлов: 25 добавлений и 0 удалений

Просмотреть файл

@@ -25,6 +25,10 @@ func ComparePassword(hash string, password string) error {
return errors.New("empty password or hash")
}
if len(password) > model.PasswordMaximumLength {
return NewErrInvalidPassword("model.user.is_valid.pwd_max_length.app_error")
}
return bcrypt.CompareHashAndPassword([]byte(hash), []byte(password))
}