Skip to content

Commit

Permalink
Disable the generic extractor entirely
Browse files Browse the repository at this point in the history
It can be used for SSRF attacks even when redirects are disabled
  • Loading branch information
Rudloff committed Mar 8, 2022
1 parent 148a171 commit 8913f27
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
],
"patches": {
"ytdl-org/youtube-dl": {
"Disable redirects in generic extractor": "patches/youtube-dl-redirect.diff"
"Disable the generic extractor": "patches/youtube-dl-disable-generic.diff"
}
}
},
Expand Down
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions patches/youtube-dl-disable-generic.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py
index 18d8dbcd6..4d3edfac3 100644
--- a/youtube_dl/extractor/__init__.py
+++ b/youtube_dl/extractor/__init__.py
@@ -13,7 +13,6 @@ except ImportError:
for name, klass in globals().items()
if name.endswith('IE') and name != 'GenericIE'
]
- _ALL_CLASSES.append(GenericIE)


def gen_extractor_classes():
12 changes: 0 additions & 12 deletions patches/youtube-dl-redirect.diff

This file was deleted.

0 comments on commit 8913f27

Please sign in to comment.