Commit ff6389a5 authored by boojack's avatar boojack

fix(api): appease image size lint

parent c4566376
......@@ -768,7 +768,9 @@ func (s *APIV1Service) acquireImageProcessingSlot(ctx context.Context) (func(),
func validateImagePixelCount(imageData []byte) error {
config, _, err := image.DecodeConfig(bytes.NewReader(imageData))
if err != nil {
return nil
// Some formats supported by imaging do not expose dimensions through
// the standard image registry. Let the full decoder handle those.
return nil //nolint:nilerr
}
if config.Width <= 0 || config.Height <= 0 {
return errors.New("invalid image dimensions")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment