[issue5871] email.header.Header too lax with embeded newlines

R. David Murray report at bugs.python.org
Fri Aug 6 05:20:56 CEST 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

Yeah, it's a good question whether or not this is enough of a behavior change that the fix can't be backported.  On the other hand, this is definitely a bug (the RFCs specifiy that header values may not contain newlines or carriage returns), so at the moment I'm inclined toward backporting.  I've got it on my list of things to worry about in the next version of email, but unfortunately that won't make it into 3.2.  I'm raising the priority because I think I should at least fix this in the existing package in 3.2.

Jakub, if you feel motivated to propose a patch that inclues unit tests, that would be very helpful.  I believe the correct thing to do would be to raise a ValueError if the argument to Header contains any /n or /r characters.

----------
keywords: +easy
priority: normal -> high

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


More information about the Python-bugs-list mailing list