From 2902657e5be4ecc458d69e9decddea37e6298ebe Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Wed, 13 Sep 2017 12:20:57 +0200 Subject: [PATCH] Extract content only from the signed part of multipart/signed messages --- .../java/com/fsck/k9/mail/internet/MessageExtractor.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/k9mail-library/src/main/java/com/fsck/k9/mail/internet/MessageExtractor.java b/k9mail-library/src/main/java/com/fsck/k9/mail/internet/MessageExtractor.java index 009ecb9ba..ec15f913a 100644 --- a/k9mail-library/src/main/java/com/fsck/k9/mail/internet/MessageExtractor.java +++ b/k9mail-library/src/main/java/com/fsck/k9/mail/internet/MessageExtractor.java @@ -162,6 +162,11 @@ public class MessageExtractor { Alternative alternative = new Alternative(text, html); outputViewableParts.add(alternative); } + } else if (isSameMimeType(part.getMimeType(), "multipart/signed")) { + if (multipart.getCount() > 0) { + BodyPart bodyPart = multipart.getBodyPart(0); + findViewablesAndAttachments(bodyPart, outputViewableParts, outputNonViewableParts); + } } else { // For all other multipart parts we recurse to grab all viewable children. for (Part bodyPart : multipart.getBodyParts()) {