]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/downloader/common.py
[core] Fix HTTP headers and cookie handling
[yt-dlp.git] / yt_dlp / downloader / common.py
index 2c404ee9022c9c8fe033a08e5bd0eb6f4e424125..b71d7ee8f2a03e0d09182ce9150e5a61194e5f9b 100644 (file)
@@ -32,7 +32,6 @@
     timetuple_from_msec,
     try_call,
 )
-from ..utils.traversal import traverse_obj
 
 
 class FileDownloader:
@@ -453,11 +452,6 @@ def download(self, filename, info_dict, subtitle=False):
             self.to_screen(f'[download] Sleeping {sleep_interval:.2f} seconds ...')
             time.sleep(sleep_interval)
 
-        # Filter the `Cookie` header from the info_dict to prevent leaks.
-        # See: https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-v8mc-9377-rwjj
-        info_dict['http_headers'] = dict(traverse_obj(info_dict, (
-            'http_headers', {dict.items}, lambda _, pair: pair[0].lower() != 'cookie'))) or None
-
         ret = self.real_download(filename, info_dict)
         self._finish_multiline_status()
         return ret, True