Update to v2.20.0
This fixes CVE-2018-18074.
This commit is contained in:
parent
f9bcf85a1e
commit
81e207395f
6 changed files with 24 additions and 51 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -37,3 +37,6 @@
|
|||
/requests-v2.18.1.tar.gz
|
||||
/requests-v2.18.2.tar.gz
|
||||
/requests-v2.18.4.tar.gz
|
||||
/requests-v2.19.0.tar.gz
|
||||
/requests-v2.19.1.tar.gz
|
||||
/requests-v2.20.0.tar.gz
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ Signed-off-by: Jeremy Cline <jeremy@jcline.org>
|
|||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/requests/__init__.py b/requests/__init__.py
|
||||
index 268e7dcc..45b2c679 100644
|
||||
index a5b3c9c3..e312d314 100644
|
||||
--- a/requests/__init__.py
|
||||
+++ b/requests/__init__.py
|
||||
@@ -79,13 +79,6 @@ except (AssertionError, ValueError):
|
||||
@@ -90,17 +90,6 @@ except (AssertionError, ValueError):
|
||||
"version!".format(urllib3.__version__, chardet.__version__),
|
||||
RequestsDependencyWarning)
|
||||
|
||||
|
|
@ -23,6 +23,10 @@ index 268e7dcc..45b2c679 100644
|
|||
-try:
|
||||
- from urllib3.contrib import pyopenssl
|
||||
- pyopenssl.inject_into_urllib3()
|
||||
-
|
||||
- # Check cryptography version
|
||||
- from cryptography import __version__ as cryptography_version
|
||||
- _check_cryptography(cryptography_version)
|
||||
-except ImportError:
|
||||
- pass
|
||||
-
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
From 75f027ac8bc55ad280f7bf72a25db1ce8c1fc76d Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Cline <jeremy@jcline.org>
|
||||
Date: Mon, 19 Jun 2017 16:19:53 -0400
|
||||
Subject: [PATCH] Don't import OrderedDict from urllib3
|
||||
|
||||
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
|
||||
---
|
||||
requests/compat.py | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/requests/compat.py b/requests/compat.py
|
||||
index 5c09ea8..61fa0c8 100644
|
||||
--- a/requests/compat.py
|
||||
+++ b/requests/compat.py
|
||||
@@ -46,7 +46,10 @@ if is_py2:
|
||||
from Cookie import Morsel
|
||||
from StringIO import StringIO
|
||||
|
||||
- from urllib3.packages.ordered_dict import OrderedDict
|
||||
+ try:
|
||||
+ from collections import OrderedDict # py2.7+
|
||||
+ except:
|
||||
+ from ordereddict import OrderedDict # py2.6 and lower (el6, etc.
|
||||
|
||||
builtin_str = str
|
||||
bytes = str
|
||||
--
|
||||
2.9.4
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From fd9ab446d8479360d2c1c8252508d97d58ed3e0e Mon Sep 17 00:00:00 2001
|
||||
From a8ef690988f92a56226f8b688f1a3638346bca8e Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Cline <jeremy@jcline.org>
|
||||
Date: Mon, 19 Jun 2017 16:09:02 -0400
|
||||
Subject: [PATCH] Patch requests/certs.py to use the system CA bundle
|
||||
|
|
@ -10,7 +10,7 @@ Signed-off-by: Jeremy Cline <jeremy@jcline.org>
|
|||
2 files changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/requests/certs.py b/requests/certs.py
|
||||
index d1a378d..7b103ba 100644
|
||||
index d1a378d7..7b103baf 100644
|
||||
--- a/requests/certs.py
|
||||
+++ b/requests/certs.py
|
||||
@@ -11,8 +11,17 @@ only one — the one from the certifi package.
|
||||
|
|
@ -33,17 +33,17 @@ index d1a378d..7b103ba 100644
|
|||
if __name__ == '__main__':
|
||||
print(where())
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 93a8507..2db9569 100755
|
||||
index 4e2ad936..60de5861 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -45,7 +45,6 @@ requires = [
|
||||
'chardet>=3.0.2,<3.1.0',
|
||||
'idna>=2.5,<2.7',
|
||||
'urllib3>=1.21.1,<1.23',
|
||||
'idna>=2.5,<2.8',
|
||||
'urllib3>=1.21.1,<1.25',
|
||||
- 'certifi>=2017.4.17'
|
||||
|
||||
]
|
||||
test_requirements = ['pytest-httpbin==0.0.7', 'pytest-cov', 'pytest-mock', 'pytest-xdist', 'PySocks>=1.5.6, !=1.5.7', 'pytest>=2.8.0']
|
||||
test_requirements = [
|
||||
--
|
||||
2.9.4
|
||||
2.19.1
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
|
||||
Name: python-requests
|
||||
Version: 2.18.4
|
||||
Release: 4%{?dist}
|
||||
Version: 2.20.0
|
||||
Release: 1%{?dist}
|
||||
Summary: HTTP library, written in Python, for human beings
|
||||
|
||||
License: ASL 2.0
|
||||
|
|
@ -20,14 +20,6 @@ Source0: https://github.com/requests/requests/archive/v%{version}/request
|
|||
# https://bugzilla.redhat.com/show_bug.cgi?id=904614
|
||||
Patch0: patch-requests-certs.py-to-use-the-system-CA-bundle.patch
|
||||
|
||||
# Remove an unnecessary reference to a bundled compat lib in urllib3
|
||||
# Some discussion with upstream:
|
||||
# - https://twitter.com/sigmavirus24/status/529816751651819520
|
||||
# - https://github.com/kennethreitz/requests/issues/1811
|
||||
# - https://github.com/kennethreitz/requests/pull/1812
|
||||
Patch1: dont-import-OrderedDict-from-urllib3.patch
|
||||
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1450608
|
||||
Patch2: Remove-tests-that-use-the-tarpit.patch
|
||||
|
||||
|
|
@ -135,18 +127,21 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
|
|||
|
||||
%files -n python2-requests
|
||||
%license LICENSE
|
||||
%doc README.rst HISTORY.rst
|
||||
%doc README.md HISTORY.md
|
||||
%{python2_sitelib}/*.egg-info
|
||||
%{python2_sitelib}/requests/
|
||||
|
||||
%files -n python%{python3_pkgversion}-requests
|
||||
%license LICENSE
|
||||
%doc README.rst HISTORY.rst
|
||||
%doc README.md HISTORY.md
|
||||
%{python3_sitelib}/*.egg-info
|
||||
%{python3_sitelib}/requests/
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Oct 29 2018 Jeremy Cline <jeremy@jcline.org> - 2.20.0-1
|
||||
- Update to v2.20.0
|
||||
|
||||
* Mon Apr 16 2018 Jeremy Cline <jeremy@jcline.org> - 2.18.4-4
|
||||
- Stop injecting PyOpenSSL (rhbz 1567862)
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (requests-v2.18.4.tar.gz) = 8ca20fe18d13b8c62977be0c51617f2ae8618d3d002ad4dc554362828855db7359274efbff0cd13e8c5699508913e91205cffcf306221a70321e74ac10b2d4d7
|
||||
SHA512 (requests-v2.20.0.tar.gz) = 766c69d1778e7286232fcd750842e89cd9bb6637076e80fe95fb67f3ccb14049bf74a533de91ef9451ac6f397ad0a6d148eb444009f501178138cdeffc5ee7c4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue