Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief summary
Skip podcast episodes with malformed enclosure URLs instead of allowing URL normalization to reject the complete episode-download operation. Valid episodes that follow are still processed.
Which issue is fixed?
Fixes #4847
In-depth Description
PodcastEpisodeDownload.setData()validates and normalizes enclosure URLs usingdecodeURIComponent()andencodeURI(). Certain malformed percent-encoded URLs causedecodeURIComponent()to throw aURIError.Previously, this error escaped from
PodcastManager.downloadPodcastEpisodes(), rejecting the manager promise and preventing later episodes in the same batch from being processed.The manager now catches only
URIErrorwhile preparing each episode, logs the affected episode, and continues with the remaining episodes. Unexpected non-URIErrorfailures are still rethrown normally.Regression tests cover malformed percent-encoded URLs, valid URL normalization, unexpected error propagation, and continuation to a valid episode after a malformed one.
How have you tested this?
URIError: URI malformedusing an enclosure URL matching the malformed percent-encoding pattern from issue [Bug]: Bad URL when downloading podcast causes server crash #4847.git diff --check: passed.Screenshots
Not applicable — this is a server-side change with no user-interface changes.