[issue38698] While parsing email message id: UnboundLocalError

Nikita Hoffmann report at bugs.python.org
Tue Nov 5 08:03:28 EST 2019


New submission from Nikita Hoffmann <hoffmann.nikita at gmail.com>:

Parsing an invalid email message id can throw a header parser error. A bug in parse_message_ still tries to append the unset token to a variable.

File "/opt/python-3.8.0/lib/python3.8/email/_header_value_parser.py", line 2116, in parse_message_
id
    message_id.append(token)
UnboundLocalError: local variable 'token' referenced before assignment

Version 3.7 is not affected.

----------
components: email
messages: 356030
nosy: Nikita Hoffmann, barry, r.david.murray
priority: normal
severity: normal
status: open
title: While parsing email message id: UnboundLocalError
type: crash
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38698>
_______________________________________


More information about the Python-bugs-list mailing list