summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3-setuptools/CVE-2022-40897.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python3-setuptools/CVE-2022-40897.patch')
-rw-r--r--meta/recipes-devtools/python/python3-setuptools/CVE-2022-40897.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-setuptools/CVE-2022-40897.patch b/meta/recipes-devtools/python/python3-setuptools/CVE-2022-40897.patch
new file mode 100644
index 0000000000..9150cea07e
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-setuptools/CVE-2022-40897.patch
@@ -0,0 +1,29 @@
1From 43a9c9bfa6aa626ec2a22540bea28d2ca77964be Mon Sep 17 00:00:00 2001
2From: "Jason R. Coombs" <jaraco@jaraco.com>
3Date: Fri, 4 Nov 2022 13:47:53 -0400
4Subject: [PATCH] Limit the amount of whitespace to search/backtrack. Fixes
5 #3659.
6
7CVE: CVE-2022-40897
8Upstream-Status: Backport [
9Upstream : https://github.com/pypa/setuptools/commit/43a9c9bfa6aa626ec2a22540bea28d2ca77964be
10Import from Ubuntu: http://archive.ubuntu.com/ubuntu/pool/main/s/setuptools/setuptools_45.2.0-1ubuntu0.1.debian.tar.xz
11]
12Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
13
14---
15 setuptools/package_index.py | 2 +-
16 setuptools/tests/test_packageindex.py | 1 -
17 2 files changed, 1 insertion(+), 2 deletions(-)
18
19--- setuptools-45.2.0.orig/setuptools/package_index.py
20+++ setuptools-45.2.0/setuptools/package_index.py
21@@ -215,7 +215,7 @@ def unique_values(func):
22 return wrapper
23
24
25-REL = re.compile(r"""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I)
26+REL = re.compile(r"""<([^>]*\srel\s{0,10}=\s{0,10}['"]?([^'" >]+)[^>]*)>""", re.I)
27 # this line is here to fix emacs' cruddy broken syntax highlighting
28
29