diff --git a/bsc1222537-py2-email-addr-parse.patch b/bsc1222537-py2-email-addr-parse.patch new file mode 100644 index 0000000..91ffe78 --- /dev/null +++ b/bsc1222537-py2-email-addr-parse.patch @@ -0,0 +1,20 @@ +--- + Lib/email/test/test_email.py | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/Lib/email/test/test_email.py ++++ b/Lib/email/test/test_email.py +@@ -2502,6 +2502,13 @@ Foo + # Test Utils.supports_strict_parsing attribute + self.assertEqual(Utils.supports_strict_parsing, True) + ++ def test_parsing_unicode_str(self): ++ email_in = "Honza Novák " ++ self.assertEqual(Utils.parseaddr(email_in), ++ ('Honza Nov\xc3\xa1k', 'honza@example.com')) ++ self.assertEqual(Utils.parseaddr(email_in.decode('utf-8')), ++ ('Honza Nov\xc3\xa1k', 'honza@example.com')) ++ + def test_getaddresses_nasty(self): + for addresses, expected in ( + ([u'"Sürname, Firstname" '], diff --git a/python-base.spec b/python-base.spec index 16bd9d6..59a626a 100644 --- a/python-base.spec +++ b/python-base.spec @@ -167,6 +167,9 @@ Patch80: CVE-2022-48566-compare_digest-more-constant.patch # PATCH-FIX-UPSTREAM CVE-2022-48560-after-free-heappushpop.patch bsc#1214675 mcepl@suse.com # fix use after free in heapq.heappushpop() Patch81: CVE-2022-48560-after-free-heappushpop.patch +# PATCH-FIX-UPSTREAM bsc1222537-py2-email-addr-parse.patch bsc#1222537 mcepl@suse.com +# email.utils.parseaddr should accept unicode string +Patch82: bsc1222537-py2-email-addr-parse.patch # COMMON-PATCH-END %define python_version %(echo %{tarversion} | head -c 3) BuildRequires: automake @@ -324,6 +327,7 @@ other applications. %patch -P 79 -p1 %patch -P 80 -p1 %patch -P 81 -p1 +%patch -P 82 -p1 # For patch 66 cp -v %{SOURCE66} Lib/test/recursion.tar diff --git a/python-doc.spec b/python-doc.spec index e922e82..db492e6 100644 --- a/python-doc.spec +++ b/python-doc.spec @@ -163,6 +163,9 @@ Patch80: CVE-2022-48566-compare_digest-more-constant.patch # PATCH-FIX-UPSTREAM CVE-2022-48560-after-free-heappushpop.patch bsc#1214675 mcepl@suse.com # fix use after free in heapq.heappushpop() Patch81: CVE-2022-48560-after-free-heappushpop.patch +# PATCH-FIX-UPSTREAM bsc1222537-py2-email-addr-parse.patch bsc#1222537 mcepl@suse.com +# email.utils.parseaddr should accept unicode string +Patch82: bsc1222537-py2-email-addr-parse.patch # COMMON-PATCH-END Provides: pyth_doc = %{version} Provides: pyth_ps = %{version} @@ -255,6 +258,7 @@ Python, and Macintosh Module Reference in PDF format. %patch -P 79 -p1 %patch -P 80 -p1 %patch -P 81 -p1 +%patch -P 82 -p1 # For patch 66 cp -v %{SOURCE66} Lib/test/recursion.tar diff --git a/python.spec b/python.spec index 85425ff..305ff71 100644 --- a/python.spec +++ b/python.spec @@ -163,6 +163,9 @@ Patch80: CVE-2022-48566-compare_digest-more-constant.patch # PATCH-FIX-UPSTREAM CVE-2022-48560-after-free-heappushpop.patch bsc#1214675 mcepl@suse.com # fix use after free in heapq.heappushpop() Patch81: CVE-2022-48560-after-free-heappushpop.patch +# PATCH-FIX-UPSTREAM bsc1222537-py2-email-addr-parse.patch bsc#1222537 mcepl@suse.com +# email.utils.parseaddr should accept unicode string +Patch82: bsc1222537-py2-email-addr-parse.patch # COMMON-PATCH-END BuildRequires: automake BuildRequires: db-devel @@ -375,6 +378,7 @@ that rely on earlier non-verification behavior. %patch -P 79 -p1 %patch -P 80 -p1 %patch -P 81 -p1 +%patch -P 82 -p1 # For patch 66 cp -v %{SOURCE66} Lib/test/recursion.tar