diff --git a/Fix-rejecting-URLs-with-unsafe-characters-in.patch b/Fix-rejecting-URLs-with-unsafe-characters-in.patch deleted file mode 100644 index 98ac7258b892852618dc2baf000dc404c8f93986..0000000000000000000000000000000000000000 --- a/Fix-rejecting-URLs-with-unsafe-characters-in.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 4f7cc3a38802c2ec54b1168815792b49656f7fa0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= -Date: Fri, 7 May 2021 10:49:27 +0200 -Subject: [PATCH] Fix rejecting URLs with unsafe characters in - ---- - botocore/utils.py | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/botocore/utils.py b/botocore/utils.py -index cf61e7a..57f6194 100644 ---- a/botocore/utils.py -+++ b/botocore/utils.py -@@ -173,6 +173,10 @@ ZONE_ID_PAT = "(?:%25|%)(?:[" + UNRESERVED_PAT + "]|%[a-fA-F0-9]{2})+" - IPV6_ADDRZ_PAT = r"\[" + IPV6_PAT + r"(?:" + ZONE_ID_PAT + r")?\]" - IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT + "$") - -+# These are the characters that are stripped by post-bpo-43882 urlparse(). -+UNSAFE_URL_CHARS = frozenset('\t\r\n') -+ -+ - def ensure_boolean(val): - """Ensures a boolean value if a string or boolean is provided - -@@ -977,6 +981,8 @@ class ArgumentGenerator(object): - - - def is_valid_ipv6_endpoint_url(endpoint_url): -+ if UNSAFE_URL_CHARS.intersection(endpoint_url): -+ return False - netloc = urlparse(endpoint_url).netloc - return IPV6_ADDRZ_RE.match(netloc) is not None - -@@ -990,6 +996,10 @@ def is_valid_endpoint_url(endpoint_url): - :return: True if the endpoint url is valid. False otherwise. - - """ -+ # post-bpo-43882 urlsplit() strips unsafe characters from URL, causing -+ # it to pass hostname validation below. Detect them early to fix that. -+ if UNSAFE_URL_CHARS.intersection(endpoint_url): -+ return False - parts = urlsplit(endpoint_url) - hostname = parts.hostname - if hostname is None: --- -2.27.0 - diff --git a/botocore-1.20.26.tar.gz b/botocore-1.23.4.tar.gz similarity index 48% rename from botocore-1.20.26.tar.gz rename to botocore-1.23.4.tar.gz index 21f68c3c2b6411ec85d3cd798bb790a6a128f9d9..40a0d40ac9e647fbf82f4e055d250994a5b52c78 100644 Binary files a/botocore-1.20.26.tar.gz and b/botocore-1.23.4.tar.gz differ diff --git a/python-botocore.spec b/python-botocore.spec index 120127699ab3793756508a23c13898826a2f57cb..ca9d3679fd53e5b42f7164b6586a572f1391e206 100644 --- a/python-botocore.spec +++ b/python-botocore.spec @@ -1,13 +1,11 @@ %global pypi_name botocore Name: python-%{pypi_name} -Version: 1.20.26 -Release: 2 +Version: 1.23.4 +Release: 1 Summary: Low-level, data-driven core of boto 3 License: Apache-2.0 URL: https://github.com/boto/botocore -Source0: https://files.pythonhosted.org/packages/09/e9/3f85aac6fcf346a12b59e7f946aa23a732c0689a39c9a658dd3dc91c3ea6/botocore-1.20.26.tar.gz -# https://github.com/boto/botocore/issues/2377 -Patch00: Fix-rejecting-URLs-with-unsafe-characters-in.patch +Source0: https://files.pythonhosted.org/packages/b1/25/2da6559083f9dc3f9863c1dc0c18ec18098fd06990f71693c3b63777ce57/botocore-1.23.4.tar.gz BuildArch: noarch %description A low-level interface to a growing number of Amazon Web Services. The @@ -16,14 +14,13 @@ botocore package is the foundation for the AWS CLI as well as boto3. %package -n python3-%{pypi_name} Summary: Low-level, data-driven core of boto 3 BuildRequires: python3-devel python3-setuptools -buildRequires: python3-nose buildRequires: python3-tox buildRequires: python3-mock -buildRequires: python3-behave buildRequires: python3-jsonschema BuildRequires: python3-urllib3 BuildRequires: python3-dateutil BuildRequires: python3-jmespath +BuildRequires: python3-pytest %{?python_provide:%python_provide python3-%{pypi_name}} Requires: python3-jmespath %description -n python3-%{pypi_name} @@ -43,8 +40,7 @@ rm -vr tests/functional/leak %py3_install %check -cd tests -nosetests-%{python3_version} unit functional +%{__python3} -m pytest tests/unit %files -n python3-%{pypi_name} %doc README.rst @@ -53,6 +49,9 @@ nosetests-%{python3_version} unit functional %{python3_sitelib}/%{pypi_name}-*.egg-info/ %changelog +* Wed Apr 6 2022 caodongxia - 1.23.4-1 +- Upgrade python-botocore to 1.23.4 + * Thu Mar 31 202 wulei - 1.20.26.2 - Fix rejecting URLs with unsafe characters in is_valid_endpoint_url()