]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-143921: Reject NUL, CR and LF in IMAP commands (GH-143922, GH-153067) ...
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 7 Jul 2026 18:38:25 +0000 (21:38 +0300)
committerGitHub <noreply@github.com>
Tue, 7 Jul 2026 18:38:25 +0000 (18:38 +0000)
commit71926d943c05bde79bd2a866933103541d91b6a2
tree8ab50b4692711e3f8d2c2910706f6602700d3b77
parent39264edce73c443b01a89d7f07ace764eb600a84
[3.13] gh-143921: Reject NUL, CR and LF in IMAP commands (GH-143922, GH-153067) (GH-153137) (GH-153287)

Combined backport of GH-143922, which rejected all control characters,
and GH-153067, which narrowed the check to NUL, CR and LF.  Other
control characters are valid in quoted strings and are sent quoted.

(cherry picked from commit 6262704b134db2a4ba12e85ecfbd968534f28b45)
(cherry picked from commit d0921efb665aff26b378f495e5ff84f7e3fe649d)
(cherry picked from commit 298182272a740ce2016aee2f54acbd0bba1944c1)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Lib/imaplib.py
Lib/test/test_imaplib.py
Misc/NEWS.d/next/Security/2026-01-16-11-41-06.gh-issue-143921.AeCOor.rst [new file with mode: 0644]