Skip to content

bpo-1025395: Fix email.utils.parseaddr to handle multiple hops#6917

Closed
ioanatia wants to merge 1 commit intopython:masterfrom
ioanatia:ioanatia-fix-email-utils-parseaddr
Closed

bpo-1025395: Fix email.utils.parseaddr to handle multiple hops#6917
ioanatia wants to merge 1 commit intopython:masterfrom
ioanatia:ioanatia-fix-email-utils-parseaddr

Conversation

@ioanatia
Copy link
Copy Markdown

@ioanatia ioanatia commented May 16, 2018

This fixes a very old issue with email.utils.parseaddr.
Right now email.utils.parseaddr will fail to parse the input correctly when the address contains a route with multiple hops. However it does not have an issue with single hop routes.

RFC5322 states that including route hops is obsolete and that the route part should be ignored (Section 4.4). It also states that this syntax is valid and it must be accepted and parsed (Section 4).

https://bugs.python.org/issue1025395

This is a duplicate of #142 , the Travis build failing because of changes unrelated to the PR. I have rebased my old branch on latest master, but that still does not seem to help. 🤔 🐱 . @Mariatta

@brettcannon
Copy link
Copy Markdown
Member

@bitdancer any chance of a review of this?

@Mariatta Mariatta requested a review from warsaw July 18, 2018 23:28
@Mariatta
Copy link
Copy Markdown
Member

@warsaw or @bitdancer Will one of you be able to review this please? Thanks.

@ioanatia ioanatia closed this May 29, 2019
Copy link
Copy Markdown
Contributor

@maxking maxking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ioanatia for this fix, not sure why you closed this PR though :)

The patch looks good to me and seems to fix the bug, I have suggested a slight modification to the NEWS entry.

@@ -0,0 +1 @@
Fix email.utils.parseaddr to handle multiple hops
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest a slight change to wrap email.utils.parseaddr in double backticks "``" so that it is rendered correctly with code in rst format.

Also, can you can add a full stop at the end of the sentence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants