mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-18 07:30:29 +00:00
Update core/podcasts/podcasts.go
Co-authored-by: strix-security[bot] <257889806+strix-security[bot]@users.noreply.github.com>
This commit is contained in:
parent
8d3facf0dd
commit
7338461efe
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user