]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-145831: email.quoprimime: `decode()` leaves stray `\r` when `eol='\r\n'` (#145832) main
authorStefan Zetzsche <120379523+stefanzetzsche@users.noreply.github.com>
Thu, 9 Apr 2026 20:21:49 +0000 (21:21 +0100)
committerGitHub <noreply@github.com>
Thu, 9 Apr 2026 20:21:49 +0000 (16:21 -0400)
commit1a0edb1fa899c067f19b09598b45cdb6e733c4ee
treeea06718b969829c139a5e7c6bd5ddadbfb2801e0
parent0f492326647a760ab6d66d20334c3308df64a02d
gh-145831: email.quoprimime: `decode()` leaves stray `\r` when `eol='\r\n'` (#145832)

decoded[:-1] only strips one character, leaving a stray \r when eol
is two characters. Fix: decoded[:-len(eol)].
Lib/email/quoprimime.py
Lib/test/test_email/test_email.py
Misc/NEWS.d/next/Library/2026-03-11-15-09-52.gh-issue-145831._sW94w.rst [new file with mode: 0644]