Staging
v0.5.1
v0.5.1
Revision f62a372928fbf6a2ba722f12f069b75ca6ad16fb authored by Miss Islington (bot) on 05 June 2019, 10:23:37 UTC, committed by GitHub on 05 June 2019, 10:23:37 UTC
* bpo-30835: email: Fix AttributeError when parsing invalid Content-Transfer-Encoding Parsing an email containing a multipart Content-Type, along with a Content-Transfer-Encoding containing an invalid (non-ASCII-decodable) byte will fail. email.feedparser.FeedParser._parsegen() gets the header and attempts to convert it to lowercase before comparing it with the accepted encodings, but as the header contains an invalid byte, it's returned as a Header object rather than a str. Cast the Content-Transfer-Encoding header to a str to avoid this. Found using the AFL fuzzer. Reported-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Andrew Donnellan <andrew@donnellan.id.au> * Add email and NEWS entry for the bugfix. (cherry picked from commit aa79707262f893428665ef45b5e879129abca4aa) Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
1 parent 3d75bd1
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...