Update core/podcasts/podcasts.go

Co-authored-by: strix-security[bot] <257889806+strix-security[bot]@users.noreply.github.com>
This commit is contained in:
Jiho Andrew Lee 2026-09-07 17:36:45 +09:00
commit 7338461efe

View file

@ -312,6 +312,10 @@ func (s *podcastService) doDownload(ctx context.Context, ep *model.PodcastEpisod
}
defer f.Close()
if err := validateURL(ep.EnclosureURL); err != nil {
s.setEpisodeError(ctx, ep, fmt.Errorf("invalid enclosure URL: %w", err))
return
}
httpClient := &http.Client{Timeout: 30 * time.Second}
resp, err := httpClient.Get(ep.EnclosureURL) //nolint:gosec
if err != nil {