[ python-Bugs-1629369 ] email._parseaddr AddrlistClass bug

SourceForge.net noreply at sourceforge.net
Sat Jan 6 13:33:21 CET 2007


Bugs item #1629369, was opened at 2007-01-06 12:31
Message generated for change (Settings changed) made by tkikuchi
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1629369&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Tokio Kikuchi (tkikuchi)
>Assigned to: Barry A. Warsaw (bwarsaw)
Summary: email._parseaddr AddrlistClass bug

Initial Comment:
email._parseaddr AddrlistClass incorrectly parse multilined comment (display name).

According to RFC2822, folding white space is allowed in display name.  Thus following header should be parsed as a single address "foo at example.com" having multilined display name.

To: Foo
 Bar <foo at example.com>

On the other hand, following program results in:
from email.Utils import getaddresses
s = """Foo
 Bar <foo at example.com>
"""
print getaddresses([s])

[('', 'Foo'), ('Bar', 'foo at example.com')]

Note that the first address is not valid one.

Looks like the bug is in _parseaddr.py.  Please check the patch.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1629369&group_id=5470


More information about the Python-bugs-list mailing list