import CS python-urllib3-1.25.10-5.module_el8+732+e8fbb6ce

This commit is contained in:
eabdullin 2024-03-28 14:04:59 +00:00
parent d37148de31
commit 7884399090
2 changed files with 55 additions and 1 deletions

View File

@ -0,0 +1,39 @@
From 4405b8f6ef86daadfe2f4070f9e239d41fbe25df Mon Sep 17 00:00:00 2001
From: Lumir Balhar <lbalhar@redhat.com>
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

View File

@ -6,7 +6,7 @@
Name: python-%{srcname}
Version: 1.25.10
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Python HTTP library with thread-safe connection pooling and file post
License: MIT
@ -18,6 +18,17 @@ Source1: ssl_match_hostname_py3.py
# Tracking bug: https://bugzilla.redhat.com/show_bug.cgi?id=1968074
# Upstream fix: https://github.com/urllib3/urllib3/commit/2d4a3fee6de2fa45eb82169361918f759269b4ec
Patch0: CVE-2021-33503.patch
# CVE-2023-43804
# Added the `Cookie` header to the list of headers to strip from
# requests when redirecting to a different host. As before, different headers
# can be set via `Retry.remove_headers_on_redirect`.
# Tests backported only partially as we don't use the whole part of
# testing with dummyserver.
# Tracking bug: https://bugzilla.redhat.com/show_bug.cgi?id=2242493
# Upstream fix: https://github.com/urllib3/urllib3/commit/01220354d389cd05474713f8c982d05c9b17aafb
Patch1: CVE-2023-43804.patch
BuildArch: noarch
# Exclude i686 arch. Due to a modularity issue it's being added to the
# x86_64 compose of CRB, but we don't want to ship it at all.
@ -123,6 +134,10 @@ popd
%changelog
* Thu Oct 12 2023 Lumír Balhar <lbalhar@redhat.com> - 1.25.10-5
- Security fix for CVE-2023-43804
Resolves: RHEL-11997
* Tue Jun 29 2021 Lumír Balhar <lbalhar@redhat.com> - 1.25.10-4
- Fix for CVE-2021-33503 Catastrophic backtracking in URL authority parser
Resolves: rhbz#1968074