From f04b5bedad7b281bee9814686bba1762bae092eb Mon Sep 17 00:00:00 2001 From: bashonly Date: Wed, 16 Aug 2023 18:42:48 -0500 Subject: [ie] Do not smuggle `http_headers` See: https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-3ch3-jhc6-5r8x Authored by: coletdjnz --- test/test_networking.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/test_networking.py') diff --git a/test/test_networking.py b/test/test_networking.py index 689161fb2..4466fc048 100644 --- a/test/test_networking.py +++ b/test/test_networking.py @@ -1293,6 +1293,10 @@ class TestYoutubeDLNetworking: assert 'Youtubedl-no-compression' not in rh.headers assert rh.headers.get('Accept-Encoding') == 'identity' + with FakeYDL({'http_headers': {'Ytdl-socks-proxy': 'socks://localhost:1080'}}) as ydl: + rh = self.build_handler(ydl) + assert 'Ytdl-socks-proxy' not in rh.headers + def test_build_handler_params(self): with FakeYDL({ 'http_headers': {'test': 'testtest'}, -- cgit v1.2.3