[3.9] [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr(...
authorPetr Viktorin <encukou@gmail.com>
Fri, 6 Sep 2024 11:13:54 +0000 (13:13 +0200)
committerAdrian Bunk <bunk@debian.org>
Sun, 1 Dec 2024 12:12:57 +0000 (14:12 +0200)
commita53ae7f1a12e02e647775503505dfe57dd7a54ae
tree960abc33763e3e5ab4f4e4fe0c8c3c74ea463dcc
parent8ea6234b65464d8188e8cb41e5568dd7c580d1aa
[3.9] [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() (GH-111116) (#123769)

Detect email address parsing errors and return empty tuple to
indicate the parsing error (old API). Add an optional 'strict'
parameter to getaddresses() and parseaddr() functions. Patch by
Thomas Dwyer.

(cherry picked from commit 4a153a1d3b18803a684cd1bcc2cdf3ede3dbae19)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-Authored-By: Thomas Dwyer <github@tomd.tel>
Gbp-Pq: Name 0015-3.9-CVE-2023-27043-gh-102988-Reject-malformed-addres.patch
Doc/library/email.utils.rst
Lib/email/utils.py
Lib/test/test_email/test_email.py