diff options
Diffstat (limited to 'meta/recipes-devtools/python/python3-zipp/0005-Prefer-simpler-path.rstrip-to-consolidate-checks-for.patch')
| -rw-r--r-- | meta/recipes-devtools/python/python3-zipp/0005-Prefer-simpler-path.rstrip-to-consolidate-checks-for.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-zipp/0005-Prefer-simpler-path.rstrip-to-consolidate-checks-for.patch b/meta/recipes-devtools/python/python3-zipp/0005-Prefer-simpler-path.rstrip-to-consolidate-checks-for.patch new file mode 100644 index 0000000000..de91c68361 --- /dev/null +++ b/meta/recipes-devtools/python/python3-zipp/0005-Prefer-simpler-path.rstrip-to-consolidate-checks-for.patch | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | From 9084bc59784cb240628996c1cb95f4f786ebedcc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Jason R. Coombs" <jaraco@jaraco.com> | ||
| 3 | Date: Wed, 27 Nov 2024 23:38:28 -0800 | ||
| 4 | Subject: [PATCH 5/5] Prefer simpler path.rstrip to consolidate checks for | ||
| 5 | empty or only paths. | ||
| 6 | |||
| 7 | Upstream-Status: Backport [https://github.com/jaraco/zipp/commit/cc61e6140f0dfde2ff372db932442cf6df890f09] | ||
| 8 | Rebase to v3.7.0 | ||
| 9 | CVE: CVE-2024-5569 | ||
| 10 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 11 | --- | ||
| 12 | zipp.py | 2 +- | ||
| 13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 14 | |||
| 15 | diff --git a/zipp.py b/zipp.py | ||
| 16 | index 236af49..87c4219 100644 | ||
| 17 | --- a/zipp.py | ||
| 18 | +++ b/zipp.py | ||
| 19 | @@ -55,7 +55,7 @@ def _ancestry(path): | ||
| 20 | ['//b//d///f', '//b//d', '//b'] | ||
| 21 | """ | ||
| 22 | path = path.rstrip(posixpath.sep) | ||
| 23 | - while path and not path.endswith(posixpath.sep): | ||
| 24 | + while path.rstrip(posixpath.sep): | ||
| 25 | yield path | ||
| 26 | path, tail = posixpath.split(path) | ||
| 27 | |||
| 28 | -- | ||
| 29 | 2.25.1 | ||
| 30 | |||
