Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

email._parseaddr AddrlistClass bug #44421

Closed
tkikuchi mannequin opened this issue Jan 6, 2007 · 2 comments
Closed

email._parseaddr AddrlistClass bug #44421

tkikuchi mannequin opened this issue Jan 6, 2007 · 2 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@tkikuchi
Copy link
Mannequin

tkikuchi mannequin commented Jan 6, 2007

BPO 1629369
Nosy @warsaw
Files
  • _parseaddr.py.patch: email._parseaddr.py.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/warsaw'
    closed_at = <Date 2007-03-12.03:21:43.000>
    created_at = <Date 2007-01-06.12:31:20.000>
    labels = ['library']
    title = 'email._parseaddr AddrlistClass bug'
    updated_at = <Date 2007-03-12.03:21:43.000>
    user = 'https://bugs.python.org/tkikuchi'

    bugs.python.org fields:

    activity = <Date 2007-03-12.03:21:43.000>
    actor = 'barry'
    assignee = 'barry'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2007-01-06.12:31:20.000>
    creator = 'tkikuchi'
    dependencies = []
    files = ['2266']
    hgrepos = []
    issue_num = 1629369
    keywords = []
    message_count = 2.0
    messages = ['30938', '30939']
    nosy_count = 2.0
    nosy_names = ['barry', 'tkikuchi']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1629369'
    versions = ['Python 2.5']

    @tkikuchi
    Copy link
    Mannequin Author

    tkikuchi mannequin commented Jan 6, 2007

    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@example.com" having multilined display name.

    To: Foo
    Bar <foo@example.com>

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

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

    Note that the first address is not valid one.

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

    @tkikuchi tkikuchi mannequin closed this as completed Jan 6, 2007
    @tkikuchi tkikuchi mannequin assigned warsaw Jan 6, 2007
    @tkikuchi tkikuchi mannequin added the stdlib Python modules in the Lib dir label Jan 6, 2007
    @tkikuchi tkikuchi mannequin closed this as completed Jan 6, 2007
    @tkikuchi tkikuchi mannequin assigned warsaw Jan 6, 2007
    @tkikuchi tkikuchi mannequin added the stdlib Python modules in the Lib dir label Jan 6, 2007
    @warsaw
    Copy link
    Member

    warsaw commented Mar 12, 2007

    r54280 in Python 2.6 svn trunk
    r54281 in Python 2.5

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant