From babece411a2b20b421a5859eb78614d6cc5db756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 8 Jul 2019 10:23:29 +0200 Subject: [PATCH] Set RECENT_DATE not to be older than 2 years Backports https://github.com/urllib3/urllib3/pull/1645 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1727796 --- 1645.patch | 31 +++++++++++++++++++++++++++++++ python-urllib3.spec | 9 ++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 1645.patch diff --git a/1645.patch b/1645.patch new file mode 100644 index 0000000..41f7435 --- /dev/null +++ b/1645.patch @@ -0,0 +1,31 @@ +From 19b02fee383647ede591c0368e6ac437c832b871 Mon Sep 17 00:00:00 2001 +From: Seth Michael Larson +Date: Tue, 2 Jul 2019 23:08:27 -0500 +Subject: [PATCH] Update RECENT_DATE to 2019-1-1 + +--- + src/urllib3/connection.py | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/src/urllib3/connection.py b/src/urllib3/connection.py +index 57c58fe..96f5d28 100644 +--- a/src/urllib3/connection.py ++++ b/src/urllib3/connection.py +@@ -56,11 +56,9 @@ port_by_scheme = { + 'https': 443, + } + +-# When updating RECENT_DATE, move it to within two years of the current date, +-# and not less than 6 months ago. +-# Example: if Today is 2018-01-01, then RECENT_DATE should be any date on or +-# after 2016-01-01 (today - 2 years) AND before 2017-07-01 (today - 6 months) +-RECENT_DATE = datetime.date(2017, 6, 30) ++# When it comes time to update this value as a part of regular maintenance ++# (ie test_recent_date is failing) update it to ~6 months before the current date. ++RECENT_DATE = datetime.date(2019, 1, 1) + + + class DummyConnection(object): +-- +2.21.0 + diff --git a/python-urllib3.spec b/python-urllib3.spec index 1968319..caf54d8 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 1.24.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python HTTP library with thread-safe connection pooling and file post License: MIT @@ -15,6 +15,10 @@ Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz Source1: ssl_match_hostname_py3.py BuildArch: noarch +# Merged upstream, set RECENT_DATE not to be older than 2 years +# https://bugzilla.redhat.com/show_bug.cgi?id=1727796 +Patch0: 1645.patch + %description Python HTTP module with connection pooling and file POST abilities. @@ -143,6 +147,9 @@ popd %changelog +* Mon Jul 08 2019 Miro HronĨok - 1.24.3-2 +- Set RECENT_DATE not to be older than 2 years (#1727796) + * Tue May 28 2019 Jeremy Cline - 1.24.3-1 - Update to 1.24.3 (fixes CVE-2019-9740)