Skip to content

Commit f96a3ff

Browse files
committed
Add versionchanged to parseaddr, add What's New.
1 parent 48d9f58 commit f96a3ff

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Doc/library/email.utils.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ of the new API.
6565
*email address* parts. Returns a tuple of that information, unless the parse
6666
fails, in which case a 2-tuple of ``('', '')`` is returned.
6767

68+
.. versionchanged:: 3.12
69+
For security reasons, addresses that were ambiguous and could parse into
70+
multiple different addresses now cause ``('', '')`` to be returned
71+
instead of only one of the *potential* addresses.
72+
6873

6974
.. function:: formataddr(pair, charset='utf-8')
7075

Doc/whatsnew/3.12.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,14 @@ dis
564564
:data:`~dis.hasarg` collection instead.
565565
(Contributed by Irit Katriel in :gh:`94216`.)
566566

567+
email
568+
-----
569+
570+
* :func:`email.utils.getaddresses` and :func:`email.utils.parseaddr` now return
571+
``('', '')`` 2-tuples in more situations where invalid email addresses are
572+
encountered instead of potentially inaccurate values.
573+
(Contributed by Thomas Dwyer for :gh:`102988` to ameliorate CVE-2023-27043.)
574+
567575
fractions
568576
---------
569577

0 commit comments

Comments
 (0)