[issue38621] Bad decoding of encoded-words in unstructured email headers

2019-11-04 Thread Fred Drake


Change by Fred Drake :


--
resolution: fixed -> rejected
stage: resolved -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38621] Bad decoding of encoded-words in unstructured email headers

2019-10-29 Thread Fred Drake


Fred Drake  added the comment:

It turns out this was a problem in 3.7.4; Python 3.7.5 seems to have fixed this.

Sorry for the noise.

Guess it's time to update my application to use 3.7.5!

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38621] Bad decoding of encoded-words in unstructured email headers

2019-10-29 Thread Ned Deily


Change by Ned Deily :


___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38621] Bad decoding of encoded-words in unstructured email headers

2019-10-29 Thread Fred Drake


Fred Drake  added the comment:

This problem does not exist in Python 3.6 or Python 3.8; it appears to only 
exist in Python 3.7.

--
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38621] Bad decoding of encoded-words in unstructured email headers

2019-10-28 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +maxking

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38621] Bad decoding of encoded-words in unstructured email headers

2019-10-28 Thread Fred Drake


Fred Drake  added the comment:

It's worth noting that dealing with this header eventually causes the header 
parser to enter an infinite loop.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38621] Bad decoding of encoded-words in unstructured email headers

2019-10-28 Thread Fred Drake


New submission from Fred Drake :

I've encountered a problem parsing an email with this Subject: header:

Subject: Be sure to redeem your =?utf-8?Q?$?=201.71 credit card reward
 certificate by the end of the year

email._header_value_parser.get_unstructured defers to get_encoded_word, passing 
the argument

  '=?utf-8?Q?$?=201.71 credit card reward certificate by the end of the year'

get_encoded_word eventually calls email._encoded_words.decode with the argument

  '=?utf-8?Q?$?=201.71 credit card reward certificate by the end of the year?='

This doesn't seem right, but I'm unsure of the syntactic priority of =XX and ?= 
in this case.

The policy for this is email.policy.SMTP + email.policy.strict (not sure if 
that's ideal; I'm retrieving messages from mbox files and over IMAP).

--
assignee: r.david.murray
messages: 355564
nosy: barry, fdrake, r.david.murray
priority: normal
severity: normal
status: open
title: Bad decoding of encoded-words in unstructured email headers

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com