[New-bugs-announce] [issue28262] Header folder folds incorrectly causing MissingHeaderBodySeparatorDefect

Vincent Vanlaer report at bugs.python.org
Fri Sep 23 17:22:55 EDT 2016


New submission from Vincent Vanlaer:

Example:

X-Report-Abuse:
 =?us-ascii?q?=3Chttps=3A=2F=2Fwww=2Emailitapp=2Ecom=2Freport=5Fabuse=2Ephp=3Fmid=3Dxxx-xxx-xxxx?=
 =?us-ascii?q?xxxxxxxxxxxxxxxxxxxx=3D=3D-xxx-xx-xx=3E?=

When this header is parsed and reencoded as bytes using policy.default, the result is this:

X-Report-Abuse: <https://www.mailitapp.com/report_abuse.php?mid=xxx-xxx-xxxx
xxxxxxxxxxxxxxxxxxxx==-xxx-xx-xx>

Since the header does not require its value to be an encoded word, it is written as plain text. This removes the FWS between the encoded words. However, it appears that it is still seen as a, now invalid, folding point. When an email with this header is parsed again, it causes a MissingHeaderBodySeparatorDefect

----------
components: email
messages: 277299
nosy: barry, r.david.murray, vincenttc
priority: normal
severity: normal
status: open
title: Header folder folds incorrectly causing MissingHeaderBodySeparatorDefect
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6

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


More information about the New-bugs-announce mailing list