Message321967
You should not use decode_header() on the whole From header, because that loses
information. You should parse the header first, then decode the parts that
could be RFC2047-encoded.
Quoting <https://tools.ietf.org/html/rfc2047#section-6.2>:
> NOTE: Decoding and display of encoded-words occurs *after* a
> structured field body is parsed into tokens. It is therefore
> possible to hide 'special' characters in encoded-words which, when
> displayed, will be indistinguishable from 'special' characters in the
> surrounding text. For this and other reasons, it is NOT generally
> possible to translate a message header containing 'encoded-word's to
> an unencoded form which can be parsed by an RFC 822 mail reader.
So I don't see a bug in parseaddr() here, except that the API is a bit of a
footgun. |
|
Date |
User |
Action |
Args |
2018-07-19 21:03:38 | jwilk | set | recipients:
+ jwilk, barry, r.david.murray, cnicodeme |
2018-07-19 21:03:38 | jwilk | set | messageid: <1532034218.31.0.56676864532.issue34155@psf.upfronthosting.co.za> |
2018-07-19 21:03:38 | jwilk | link | issue34155 messages |
2018-07-19 21:03:38 | jwilk | create | |
|