[issue32178] Some invalid email address groups cause an IndexError instead of a HeaderParseError

2017-11-30 Thread Massimiliano Torromeo
Massimiliano Torromeo added the comment: Disregard my last message, I posted it in the wrong bug report by mistake. Sorry about the noise -- ___ Python tracker <https://bugs.python.org/issue32

[issue32178] Some invalid email address groups cause an IndexError instead of a HeaderParseError

2017-11-30 Thread Massimiliano Torromeo
Change by Massimiliano Torromeo : -- pull_requests: -4558 ___ Python tracker <https://bugs.python.org/issue32178> ___ ___ Python-bugs-list mailing list Unsub

[issue32179] Empty email address in headers triggers an IndexError

2017-11-30 Thread Massimiliano Torromeo
New submission from Massimiliano Torromeo : 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

[issue32178] Some invalid email address groups cause an IndexError instead of a HeaderParseError

2017-11-30 Thread Massimiliano Torromeo
Massimiliano Torromeo added the comment: 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

[issue32178] Some invalid email address groups cause an IndexError instead of a HeaderParseError

2017-11-30 Thread Massimiliano Torromeo
New submission from Massimiliano Torromeo : With some malformed email address list, the parser for email groups raises an `IndexError` instead of the correct `HeaderParseError`. This results in a complete failure to parse the email while it is still preferable to just ignore the malformed