[ python-Bugs-1629369 ] email._parseaddr AddrlistClass bug
SourceForge.net
noreply at sourceforge.net
Mon Mar 12 04:21:43 CET 2007
Bugs item #1629369, was opened at 2007-01-06 07:31
Message generated for change (Comment added) made by bwarsaw
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: Closed
>Resolution: Accepted
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.
----------------------------------------------------------------------
>Comment By: Barry A. Warsaw (bwarsaw)
Date: 2007-03-11 23:21
Message:
Logged In: YES
user_id=12800
Originator: NO
r54280 in Python 2.6 svn trunk
r54281 in Python 2.5
----------------------------------------------------------------------
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