]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-145831: email.quoprimime: `decode()` leaves stray `\r` when `eol='\r\n...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 10 Apr 2026 12:49:59 +0000 (14:49 +0200)
committerGitHub <noreply@github.com>
Fri, 10 Apr 2026 12:49:59 +0000 (08:49 -0400)
commite8f3f7668f44ac83aa61f3ba0afe10e150b9fc21
tree67370cf08dd213e96a2a8fb2f51c513914559f32
parentb87590fd275b992364b716ea79341fd6069009c5
[3.14] gh-145831: email.quoprimime: `decode()` leaves stray `\r` when `eol='\r\n'` (GH-145832) (#148312)

decoded[:-1] only strips one character, leaving a stray \r when eol
is two characters. Fix: decoded[:-len(eol)].
(cherry picked from commit 1a0edb1fa899c067f19b09598b45cdb6e733c4ee)

Co-authored-by: Stefan Zetzsche <120379523+stefanzetzsche@users.noreply.github.com>
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]