]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] gh-143921: Narrow the control character check in imaplib commands (GH-153067...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 5 Jul 2026 15:58:48 +0000 (17:58 +0200)
committerGitHub <noreply@github.com>
Sun, 5 Jul 2026 15:58:48 +0000 (15:58 +0000)
commitf2cd7ef89aa8a0dcbc7283bbd39548b76f2a736a
tree77b400b55bf17ac5d2004f2e3b16523eaaf7983a
parent1289306bcd5c8563d7cf7d357ca1c81eba356fa0
[3.15] gh-143921: Narrow the control character check in imaplib commands (GH-153067) (GH-153135)

Only NUL, CR and LF are rejected now.  Other control characters are
valid in quoted strings and can occur in mailbox names returned by
the server, so they are now accepted and sent quoted.
(cherry picked from commit d0921efb665aff26b378f495e5ff84f7e3fe649d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Lib/imaplib.py
Lib/test/test_imaplib.py
Misc/NEWS.d/next/Library/2026-07-05-10-24-30.gh-issue-143921.wQx3Tn.rst [new file with mode: 0644]