[New-bugs-announce] [issue11606] maxlinelen exceeded by email module's body_encode() function

Michael Henry report at bugs.python.org
Sat Mar 19 13:13:16 CET 2011


New submission from Michael Henry <python at drmikehenry.com>:

The email module's body_encode() function (found in
quoprimime.py) can generate oversized encoded lines that exceed
the maximum line length specified by the maxlinelen parameter.
The attached test case
'test_encode_trailing_space_at_maxlinelen' demonstrates the
problem.  When encoding the body 'abcd \n1234' with
maxlinelen=5, the erroneous output is 'abcd =\n\n1234', with 6
characters in the first output line.

The attached patch provides unit tests and a fix for
body_encode().  

Note: This patch depends on application of the patch in Issue
#11590.

----------
components: Library (Lib)
files: quoprimime_patch_body_encode.patch
keywords: patch
messages: 131407
nosy: michael.henry, r.david.murray
priority: normal
severity: normal
status: open
title: maxlinelen exceeded by email module's body_encode() function
Added file: http://bugs.python.org/file21289/quoprimime_patch_body_encode.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11606>
_______________________________________


More information about the New-bugs-announce mailing list