You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Cc: value with a trailing comma causes a failure.
To Reproduce:
NO_REFOLD_POLICY = policy.SMTP.clone(refold_source='none')
with open('path', 'rb') as f:
data = f.read()
msg = email.message_from_bytes(data, policy=NO_REFOLD_POLICY)
msg.items()
...
File "/usr/lib64/python3.6/email/_header_value_parser.py", line 1365, in get_phrase
token, value = get_word(value)
File "/usr/lib64/python3.6/email/_header_value_parser.py", line 1340, in get_word
if value[0]=='"':
IndexError: string index out of range
Interestingly this doesn't happen when not specifying policy.
The text was updated successfully, but these errors were encountered:
Example:
...
From: RFC Errata System rfc-editor@rfc-editor.org
Cc: example@gmail.com,
Content-Type: text/plain; charset=UTF-8
...
The Cc: value with a trailing comma causes a failure.
To Reproduce:
NO_REFOLD_POLICY = policy.SMTP.clone(refold_source='none')
with open('path', 'rb') as f:
data = f.read()
msg = email.message_from_bytes(data, policy=NO_REFOLD_POLICY)
msg.items()
...
File "/usr/lib64/python3.6/email/_header_value_parser.py", line 1365, in get_phrase
token, value = get_word(value)
File "/usr/lib64/python3.6/email/_header_value_parser.py", line 1340, in get_word
if value[0]=='"':
IndexError: string index out of range
Interestingly this doesn't happen when not specifying policy.
The text was updated successfully, but these errors were encountered: