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

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

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

2017-11-30 Thread Massimiliano Torromeo
Change by Massimiliano Torromeo <massimiliano.torro...@gmail.com>: -- pull_requests: -4558 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32179] Empty email address in headers triggers an IndexError

2017-11-30 Thread Massimiliano Torromeo
New submission from Massimiliano Torromeo <massimiliano.torro...@gmail.com>: 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 Inde

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

2017-11-30 Thread Massimiliano Torromeo
Massimiliano Torromeo <massimiliano.torro...@gmail.com> 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 Inde

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

2017-11-30 Thread Massimiliano Torromeo
New submission from Massimiliano Torromeo <massimiliano.torro...@gmail.com>: 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 pref