<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/email, branch 3.10</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/email?h=3.10</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/email?h=3.10'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2026-03-02T23:58:52Z</updated>
<entry>
<title>[3.10] gh-143935: Email preserve parens when folding comments (GH-143936) (#144350)</title>
<updated>2026-03-02T23:58:52Z</updated>
<author>
<name>Edgar Ramírez Mondragón</name>
<email>edgarrm358@gmail.com</email>
</author>
<published>2026-03-02T23:58:52Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=003b8315669b9f08b1010a49071f73f15f818094'/>
<id>urn:sha1:003b8315669b9f08b1010a49071f73f15f818094</id>
<content type='text'>
Fix a bug in the folding of comments when flattening an email message
using a modern email policy. Comments consisting of a very long sequence of
non-foldable characters could trigger a forced line wrap that omitted the
required leading space on the continuation line, causing the remainder of
the comment to be interpreted as a new header field. This enabled header
injection with carefully crafted inputs.
(cherry picked from commit 17d1490)

Co-authored-by: Seth Michael Larson seth@python.org
Co-authored-by: Denis Ledoux dle@odoo.com

- Issue: Fix folding of long comments of unfoldable characters in email headers #143935

Signed-off-by: Edgar Ramírez Mondragón &lt;edgarrm358@gmail.com&gt;
Co-authored-by: Seth Michael Larson &lt;seth@python.org&gt;</content>
</entry>
<entry>
<title>[3.10] gh-136063: fix quadratic-complexity parsing in `email.message._parseparam` (GH-136072) (#140831)</title>
<updated>2026-01-25T17:11:05Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2026-01-25T17:11:05Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=6027dbb19916314fb3b7d7468ef3f8db592a8bb7'/>
<id>urn:sha1:6027dbb19916314fb3b7d7468ef3f8db592a8bb7</id>
<content type='text'>
gh-136063: fix quadratic-complexity parsing in `email.message._parseparam` (GH-136072)
(cherry picked from commit 680a5d070f59798bb88a1bb6eb027482b8d85c34)

Co-authored-by: Bénédikt Tran &lt;10796600+picnixz@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>[3.10] gh-144125: email: verify headers are sound in BytesGenerator (#144180)</title>
<updated>2026-01-25T17:10:00Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2026-01-25T17:10:00Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=8cdf6204f4ae821f32993f8fc6bad0d318f95f36'/>
<id>urn:sha1:8cdf6204f4ae821f32993f8fc6bad0d318f95f36</id>
<content type='text'>
gh-144125: email: verify headers are sound in BytesGenerator
(cherry picked from commit 052e55e7d44718fe46cbba0ca995cb8fcc359413)

Co-authored-by: Seth Michael Larson &lt;seth@python.org&gt;
Co-authored-by: Denis Ledoux &lt;dle@odoo.com&gt;
Co-authored-by: Denis Ledoux &lt;5822488+beledouxdenis@users.noreply.github.com&gt;
Co-authored-by: Petr Viktorin &lt;302922+encukou@users.noreply.github.com&gt;
Co-authored-by: Bas Bloemsaat &lt;1586868+basbloemsaat@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>[3.10] gh-80222: Fix email address header folding with long quoted-string (GH-122753) (GH-129111)</title>
<updated>2025-04-03T16:58:22Z</updated>
<author>
<name>R. David Murray</name>
<email>rdmurray@bitdance.com</email>
</author>
<published>2025-04-03T16:58:22Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a4ef689ce670684ec132204b1cd03720c8e0a03d'/>
<id>urn:sha1:a4ef689ce670684ec132204b1cd03720c8e0a03d</id>
<content type='text'>
Email generators using email.policy.default could incorrectly omit the
quote ('"') characters from a quoted-string during header refolding,
leading to invalid address headers and enabling header spoofing. This
change restores the quote characters on a bare-quoted-string as the
header is refolded, and escapes backslash and quote chars in the string.
(cherry picked from commit 5aaf4168583)

Co-authored-by: Mike Edmunds &lt;medmunds@gmail.com&gt;
Co-authored-by: Łukasz Langa &lt;lukasz@langa.pl&gt;</content>
</entry>
<entry>
<title>[3.10] gh-121284: Fix email address header folding with parsed encoded-word (GH-122754) (GH-131411)</title>
<updated>2025-04-03T16:27:20Z</updated>
<author>
<name>Petr Viktorin</name>
<email>encukou@gmail.com</email>
</author>
<published>2025-04-03T16:27:20Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=cfaee20d7eaa1442c1a22ef695e60ac5660bfecd'/>
<id>urn:sha1:cfaee20d7eaa1442c1a22ef695e60ac5660bfecd</id>
<content type='text'>
Email generators using email.policy.default may convert an RFC 2047
encoded-word to unencoded form during header refolding. In a structured
header, this could allow 'specials' chars outside a quoted-string,
leading to invalid address headers and enabling spoofing. This change
ensures a parsed encoded-word that contains specials is kept as an
encoded-word while the header is refolded.

[Better fix from @bitdancer.]

(cherry picked from commit 295b53df2aa18deb625a7da41f7e4babfe6ef34b)

Co-authored-by: Mike Edmunds &lt;medmunds@gmail.com&gt;
Co-authored-by: R David Murray &lt;rdmurray@bitdance.com&gt;</content>
</entry>
<entry>
<title>[3.10] [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() (GH-111116) (#123768)</title>
<updated>2024-09-06T11:14:22Z</updated>
<author>
<name>Petr Viktorin</name>
<email>encukou@gmail.com</email>
</author>
<published>2024-09-06T11:14:22Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=2a9273a0e4466e2f057f9ce6fe98cd8ce570331b'/>
<id>urn:sha1:2a9273a0e4466e2f057f9ce6fe98cd8ce570331b</id>
<content type='text'>
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 &lt;vstinner@python.org&gt;
Co-Authored-By: Thomas Dwyer &lt;github@tomd.tel&gt;
</content>
</entry>
<entry>
<title>[3.10] gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) (#122609)</title>
<updated>2024-09-04T15:38:31Z</updated>
<author>
<name>Łukasz Langa</name>
<email>lukasz@langa.pl</email>
</author>
<published>2024-09-04T15:38:31Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=06f28dc236708f72871c64d4bc4b4ea144c50147'/>
<id>urn:sha1:06f28dc236708f72871c64d4bc4b4ea144c50147</id>
<content type='text'>
Per RFC 2047:

&gt; [...] these encoding schemes allow the
&gt; encoding of arbitrary octet values, mail readers that implement this
&gt; decoding should also ensure that display of the decoded data on the
&gt; recipient's terminal will not cause unwanted side-effects

It seems that the "quoted-word" scheme is a valid way to include
a newline character in a header value, just like we already allow
undecodable bytes or control characters.
They do need to be properly quoted when serialized to text, though.

This should fail for custom fold() implementations that aren't careful
about newlines.

(cherry picked from commit 097633981879b3c9de9a1dd120d3aa585ecc2384)

Co-authored-by: Petr Viktorin &lt;encukou@gmail.com&gt;
Co-authored-by: Bas Bloemsaat &lt;bas@bloemsaat.org&gt;
Co-authored-by: Serhiy Storchaka &lt;storchaka@gmail.com&gt;</content>
</entry>
<entry>
<title>[3.10] gh-101021: Document binary parameters as bytes (GH-101024). (#101052)</title>
<updated>2023-01-15T05:31:59Z</updated>
<author>
<name>Barry Warsaw</name>
<email>barry@python.org</email>
</author>
<published>2023-01-15T05:31:59Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=78c9f39352a04e07ee4de7746c797ca79b5270d7'/>
<id>urn:sha1:78c9f39352a04e07ee4de7746c797ca79b5270d7</id>
<content type='text'>
(cherry picked from commit 49cae39ef020eaf242607bb2d2d193760b9855a6)

Co-authored-by: Bob Kline &lt;bkline@users.noreply.github.com&gt;

Co-authored-by: Bob Kline &lt;bkline@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>gh-95087: Fix IndexError in parsing invalid date in the email module (GH-95201)</title>
<updated>2022-07-25T06:39:00Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-07-25T06:39:00Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=94eb1e9789eacf855919cddade7d7d0d26b4f08d'/>
<id>urn:sha1:94eb1e9789eacf855919cddade7d7d0d26b4f08d</id>
<content type='text'>
Co-authored-by: wouter bolsterlee &lt;wouter@bolsterl.ee&gt;
(cherry picked from commit ea5ed0ba51c10cfdde7651a475438551964dfdfc)

Co-authored-by: Serhiy Storchaka &lt;storchaka@gmail.com&gt;</content>
</entry>
<entry>
<title>gh-93010: InvalidHeaderError used but nonexistent (GH-93015)</title>
<updated>2022-05-23T17:02:15Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-05-23T17:02:15Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b15b94de091d184e1f1281af190debaf9b92de78'/>
<id>urn:sha1:b15b94de091d184e1f1281af190debaf9b92de78</id>
<content type='text'>
* fix issue 93010

Co-authored-by: blurb-it[bot] &lt;43283697+blurb-it[bot]@users.noreply.github.com&gt;
(cherry picked from commit 71abeb0895f7563dc5ac4b4f077a8f87dab57e7a)

Co-authored-by: oda-gitso &lt;105083118+oda-gitso@users.noreply.github.com&gt;</content>
</entry>
</feed>
