From: coletdjnz Date: Tue, 6 Jun 2023 08:44:51 +0000 (+1200) Subject: [core] Prevent `Cookie` leaks on HTTP redirect X-Git-Tag: 2023.07.06~3 X-Git-Url: https://jfr.im/git/yt-dlp.git/commitdiff_plain/f8b4bcc0a791274223723488bfbfc23ea3276641 [core] Prevent `Cookie` leaks on HTTP redirect Ref: https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-v8mc-9377-rwjj Authored by: coletdjnz --- diff --git a/test/test_http.py b/test/test_http.py index 3941a6e77..e4e66dce1 100644 --- a/test/test_http.py +++ b/test/test_http.py @@ -132,6 +132,11 @@ def do_GET(self): self._method('GET') elif self.path.startswith('/headers'): self._headers() + elif self.path.startswith('/308-to-headers'): + self.send_response(308) + self.send_header('Location', '/headers') + self.send_header('Content-Length', '0') + self.end_headers() elif self.path == '/trailing_garbage': payload = b'