mirror of
https://github.com/alexta69/metube.git
synced 2026-09-21 21:45:04 +00:00
docs: document the SSRF guard's connect-time coverage limitations
The connect-time getaddrinfo guard added for redirect/rebinding SSRF covers only the download subprocess: metadata extraction runs in the main process (where a process-wide guard would reject the server's own HOST=0.0.0.0 bind), and native curl_cffi/libcurl resolution used by --impersonate bypasses Python's socket module. Record both in url_guard's docstring and at the extraction site so the boundary is explicit; network isolation remains the backstop. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1269,6 +1269,11 @@ class DownloadQueue:
|
||||
return opts
|
||||
|
||||
def __extract_info(self, url, ytdl_options_presets=None, ytdl_options_overrides=None):
|
||||
# NOTE: extraction runs in the main process, so the connect-time socket
|
||||
# guard (installed only in the download subprocess) does not apply here.
|
||||
# The ingress validate_url check guards the submitted URL, but redirects
|
||||
# followed during extraction are not re-validated. See url_guard's module
|
||||
# docstring for why the guard can't be installed process-wide.
|
||||
debug_logging = logging.getLogger().isEnabledFor(logging.DEBUG)
|
||||
user_opts = self._build_ytdl_options(ytdl_options_presets, ytdl_options_overrides)
|
||||
params = {
|
||||
|
||||
Reference in New Issue
Block a user