aboutsummaryrefslogtreecommitdiff
path: root/test/test_networking.py
diff options
context:
space:
mode:
authorbashonly <bashonly@bashonly.com>2023-08-16 18:42:48 -0500
committerSimon Sawicki <contact@grub4k.xyz>2023-11-14 22:04:25 +0100
commitf04b5bedad7b281bee9814686bba1762bae092eb (patch)
treec18255b7b8d917a21ef1d4aa1fd66b62806fed8c /test/test_networking.py
parentd4f14a72dc1dd79396e0e80980268aee902b61e4 (diff)
[ie] Do not smuggle `http_headers`
See: https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-3ch3-jhc6-5r8x Authored by: coletdjnz
Diffstat (limited to 'test/test_networking.py')
-rw-r--r--test/test_networking.py4
1 files changed, 4 insertions, 0 deletions
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'},