Matej Cepl 2024-04-15 19:07:31 +00:00 committed by Git OBS Bridge
parent 0eeee1a907
commit d4b42b6c18
4 changed files with 32 additions and 0 deletions

View File

@ -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 <honza@example.com>"
+ 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" <to@example.com>'],

View File

@ -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

View File

@ -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

View File

@ -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