Patch youtube-dl to disable redirects
In order to prevent SSRF attacks using redirects
This commit is contained in:
parent
3a4f09dda0
commit
1b099bb983
3 changed files with 1079 additions and 82 deletions
12
patches/youtube-dl-redirect.diff
Normal file
12
patches/youtube-dl-redirect.diff
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
|
||||
index f99d887ca..749ed6ecf 100644
|
||||
--- a/youtube_dl/extractor/generic.py
|
||||
+++ b/youtube_dl/extractor/generic.py
|
||||
@@ -2252,6 +2252,7 @@ class GenericIE(InfoExtractor):
|
||||
|
||||
def report_following_redirect(self, new_url):
|
||||
"""Report information extraction."""
|
||||
+ raise UnsupportedError('Redirects are not allowed')
|
||||
self._downloader.to_screen('[redirect] Following redirect to %s' % new_url)
|
||||
|
||||
def _extract_rss(self, url, video_id, doc):
|
Loading…
Add table
Add a link
Reference in a new issue