Repository navigation
Conversation
Adding a channel or playlist passed whatever URL it was given to yt-dlp, so a signed-in user could make the server request any address, including ones on the internal network. The channel id that came back was stored unchecked and later built into file paths. Both lookups now accept YouTube URLs only (a bare playlist id still works), and a channel id that is not a YouTube id or handle is refused.
The channel lookup checked the URL and then fetched the original text, which yt-dlp can read as a different host than Node does. It now fetches the parsed form, as the playlist lookup already did. The page URL yt-dlp reports for a playlist gets the same check before it is stored, a host with a trailing dot is accepted, and channel ids may contain combining marks and the middle dot that YouTube handles allow.
Contributor
📊 Test Coverage ReportBackend Coverage
Frontend Coverage
Coverage Requirements
Coverage report generated for commit a26a140 |
The URL yt-dlp returns for a channel is saved and fetched again by later refreshes. It now gets the same YouTube check as the URL the user typed, both when a channel is added and when a listing updates its URL.
The tab refresh now saves the parsed URL, which encodes handles written in other scripts. The full listing still saved the raw text, so the two would have rewritten such a channel's URL back and forth.
This branch has not been deployed
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.
Adding a channel or a playlist handed whatever URL you typed to yt-dlp. yt-dlp will fetch any address, so anyone signed in to Youtarr could make the server request other sites or addresses on its own network, such as
http://127.0.0.1:9911/. The channel id that came back was also saved as is and later used in file paths.Youtarr now only looks up YouTube addresses:
https://www.youtube.com\@127.0.0.1:9911/).You need to be signed in to use any of this, so the risk is low.
Found with Claude Mythos during a security review of the repo.
Proof: lint, typecheck and both test suites pass locally. On a dev instance the internal and lookalike URLs returned 400 and a listener inside the container saw no request, while a real channel, a playlist URL, a URL without a scheme and a bare playlist id still loaded.
Council review
Rounds: 3
Round 1 found that the channel lookup checked the URL but fetched the original text, that the playlist page URL was stored unchecked, and that a trailing dot and some handles in other scripts were refused. Round 2 confirmed those fixes and pointed out that the channel URL yt-dlp reports back was still stored as is, which round 3 covers. In round 3 Opus noticed the two refresh paths would save a handle in another script in two different forms and rewrite it back and forth. The last commit makes them agree. That last one line change was not sent back for a fourth round.