This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-ponymail.git
The following commit(s) were added to refs/heads/master by this push: new 97249fc Bug: parser fails to extract inline attachments 97249fc is described below commit 97249fc9a13e5c80ae7452de9524e216bf80a007 Author: Sebb <s...@apache.org> AuthorDate: Thu Aug 8 21:22:14 2019 +0100 Bug: parser fails to extract inline attachments This fixes #501 --- CHANGELOG.md | 1 + tools/archiver.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6685509..c529eb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ## Changes in 0.12: +- Bug: Bug: parser fails to extract inline attachments (#501) - Bug: Google OAuth used with wrong response_type (#500) - Bug: Composer uses wrong format in FROM/From headers (#496) - Bug: Errors with Elasticsearch 5.x in edit-lists.py (#489) diff --git a/tools/archiver.py b/tools/archiver.py index 1feccdc..aed1d0f 100755 --- a/tools/archiver.py +++ b/tools/archiver.py @@ -92,7 +92,8 @@ def parse_attachment(part): # Use str() in case the name is not in ASCII. # In such cases, the get() method returns a Header not a string dispositions = str(cd).strip().split(";") - if dispositions[0].lower() == "attachment": + cdtype = dispositions[0].lower() + if cdtype == "attachment" or cdtype == 'inline': fd = part.get_payload(decode=True) # Allow for empty string if fd == None: return None, None