[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)
committerSean Whitton <spwhitton@spwhitton.name>
Thu, 20 Mar 2025 02:07:39 +0000 (10:07 +0800)
commit69d8cdc5c21950766541bf6360728dbedb104dc6
treec3012652f6a8aa7182cb8b64b1e8a974a0990a97
parentc70db58615d2b266b96df36ca08e349ce4be5aea
[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