[issue1050268] rfc822.parseaddr is broken, breaks sendmail call in smtplib

R. David Murray report at bugs.python.org
Sat Oct 2 06:06:35 CEST 2010


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

After working my way through the code I no longer think that parseaddr is working as designed.  I think that this is a bug, and that there is a missing call to quote in getaddrspec.  Attached is a revised set of unit tests and a fix.  The full python test suite passes with this fix in place, but note that initially I made a mistake in the patch and running test_email passed...that is, before the attached tests there were no tests of parseaddr in the email test suite.

I don't know if this patch is safe for backport, but I'm inclined that way.  It is hard to see how 3rd party code could be compensating for this bug, since it looses quoting information that doesn't appear to be algorithmically recoverable.

----------
Added file: http://bugs.python.org/file19103/parseaddr_quote.diff

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


More information about the Python-bugs-list mailing list