diff --git a/debian/patches/CVE-2024-22195.patch b/debian/patches/CVE-2024-22195.patch index 45182c1..f98f26c 100644 --- a/debian/patches/CVE-2024-22195.patch +++ b/debian/patches/CVE-2024-22195.patch @@ -1,28 +1,14 @@ -From 7dd3680e6eea0d77fde024763657aa4d884ddb23 Mon Sep 17 00:00:00 2001 From: Calum Hutton Date: Thu, 26 Oct 2023 12:08:53 +0100 Subject: [PATCH] xmlattr filter disallows keys with spaces --- - CHANGES.rst | 1 + src/jinja2/filters.py | 28 +++++++++++++++++++++------- tests/test_filters.py | 6 ++++++ - 3 files changed, 28 insertions(+), 7 deletions(-) + 2 files changed, 27 insertions(+), 7 deletions(-) -#diff --git a/CHANGES.rst b/CHANGES.rst -#index 36db0843a..d6688e762 100644 -#--- a/CHANGES.rst -#+++ b/CHANGES.rst -#@@ -7,6 +7,7 @@ Unreleased -# -# - Fix compiler error when checking if required blocks in parent templates are -# empty. :pr:`1858` -#+- ``xmlattr`` filter does not allow keys with spaces. GHSA-h5c8-rqwp-cp95 -# -# -# Version 3.1.2 diff --git a/src/jinja2/filters.py b/src/jinja2/filters.py -index ed07c4c0e..c7ecc9bb6 100644 +index ed07c4c..c7ecc9b 100644 --- a/src/jinja2/filters.py +++ b/src/jinja2/filters.py @@ -248,13 +248,17 @@ def do_items(value: t.Union[t.Mapping[K, V], Undefined]) -> t.Iterator[t.Tuple[K @@ -74,10 +60,10 @@ index ed07c4c0e..c7ecc9bb6 100644 if autospace and rv: rv = " " + rv diff --git a/tests/test_filters.py b/tests/test_filters.py -index 32897c546..f50ed13ab 100644 +index 73f0f0b..a184649 100644 --- a/tests/test_filters.py +++ b/tests/test_filters.py -@@ -474,6 +474,12 @@ def test_xmlattr(self, env): +@@ -474,6 +474,12 @@ class TestFilter: assert 'bar="23"' in out assert 'blub:blub="<?>"' in out