Skip to content

bpo-32179: Fix handling of empty email address in header parsing#4644

Closed
mtorromeo wants to merge 1 commit into
python:masterfrom
mtorromeo:email-empty-address
Closed

bpo-32179: Fix handling of empty email address in header parsing#4644
mtorromeo wants to merge 1 commit into
python:masterfrom
mtorromeo:email-empty-address

Conversation

@mtorromeo

@mtorromeo mtorromeo commented Nov 30, 2017

Copy link
Copy Markdown

In case an address email header contains and empty string, the tokenizer return a BareQuotedString
which is also a TokenList, but this list is empty and the parser fails to check this and insteads raises an IndexError.

For example an email with this header will trigger the IndexError:
ReplyTo: ""

https://bugs.python.org/issue32179

In case an address email header contains and empty string, the tokenizer return a `BareQuotedString`
which is also a `TokenList`, but this list is empty and the parser fails to check this and insteads raises an `IndexError`.

For example an email with this header will trigger the `IndexError`:
`ReplyTo: ""`
@mtorromeo mtorromeo requested a review from a team as a code owner November 30, 2017 11:23
@the-knights-who-say-ni

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

@mtorromeo mtorromeo changed the title Fix handling of empty email address in header parsing bpo-32179: Fix handling of empty email address in header parsing Nov 30, 2017
@maxking

maxking commented Jun 14, 2019

Copy link
Copy Markdown
Contributor

I commented on b.p.o, but this issue seems to be fixed in the master. I am not sure when and which PR fixed it.

Thanks @mtorromeo for this though :)

@csabella

csabella commented Jul 3, 2019

Copy link
Copy Markdown
Contributor

Closing per @maxking's comments about not being able to recreate the issue. Thank you!

@csabella csabella closed this Jul 3, 2019
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