From 4405b8f6ef86daadfe2f4070f9e239d41fbe25df Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Fri, 13 Oct 2023 11:11:24 +0200 Subject: [PATCH] CVE-2023-43804 --- src/urllib3/util/retry.py | 2 +- test/test_retry.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/urllib3/util/retry.py b/src/urllib3/util/retry.py index ee30c91..20b7f69 100644 --- a/src/urllib3/util/retry.py +++ b/src/urllib3/util/retry.py @@ -154,7 +154,7 @@ class Retry(object): RETRY_AFTER_STATUS_CODES = frozenset([413, 429, 503]) - DEFAULT_REDIRECT_HEADERS_BLACKLIST = frozenset(["Authorization"]) + DEFAULT_REDIRECT_HEADERS_BLACKLIST = frozenset(["Cookie", "Authorization"]) #: Maximum backoff time. BACKOFF_MAX = 120 diff --git a/test/test_retry.py b/test/test_retry.py index c36476f..110688d 100644 --- a/test/test_retry.py +++ b/test/test_retry.py @@ -270,7 +270,7 @@ class TestRetry(object): def test_retry_default_remove_headers_on_redirect(self): retry = Retry() - assert list(retry.remove_headers_on_redirect) == ["authorization"] + assert retry.remove_headers_on_redirect == {"authorization", "cookie"} def test_retry_set_remove_headers_on_redirect(self): retry = Retry(remove_headers_on_redirect=["X-API-Secret"]) -- 2.41.0