ports/devel/py-setuptools44/files/patch-setuptools_package__index.py
Eugene Grosbein a3d611120f
devel/py-setuptools{44,58}: fix CVE-2022-40897 backporting a patch
Follow recent commit to devel/py-setuptools and fix old versions same way.

Reported-by:	vishwin
2023-06-22 20:45:10 +07:00

11 lines
392 B
Python

--- setuptools/package_index.py.orig 2022-07-04 02:25:25 UTC
+++ setuptools/package_index.py
@@ -197,7 +197,7 @@ def unique_values(func):
return wrapper
-REL = re.compile(r"""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I)
+REL = re.compile(r"""<([^>]*\srel\s{0,10}=\s{0,10}['"]?([^'" >]+)[^>]*)>""", re.I)
# this line is here to fix emacs' cruddy broken syntax highlighting