talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit bbb1f7285d0f033f39e835be9994a12c335a8fd8
parent 2e0142c77fdd8e4ef209237ae74176bfc3a7e3cb
Author: Paul <paul@claws-mail.org>
Date:   Tue, 11 Jun 2024 10:30:02 +0100

it is not required for an inline attachment to have a name, filename, or Content-ID

Diffstat:
Msrc/folder.c | 13+++----------
1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/folder.c b/src/folder.c @@ -1,6 +1,6 @@ /* * Claws Mail -- a GTK based, lightweight, and fast e-mail client - * Copyright (C) 1999-2020 the Claws Mail team and Hiroyuki Yamamoto + * Copyright (C) 1999-2024 the Claws Mail team and Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -2861,7 +2861,8 @@ static void msginfo_set_mime_flags(GNode *node, gpointer data) MsgInfo *msginfo = data; MimeInfo *mimeinfo = node->data; - if (mimeinfo->disposition == DISPOSITIONTYPE_ATTACHMENT && + if ((mimeinfo->disposition == DISPOSITIONTYPE_ATTACHMENT || + mimeinfo->disposition == DISPOSITIONTYPE_INLINE) && (!mimeinfo->subtype || (strcmp(mimeinfo->subtype, "pgp-signature") && strcmp(mimeinfo->subtype, "x-pkcs7-signature") && strcmp(mimeinfo->subtype, "pkcs7-signature")))) { @@ -2875,14 +2876,6 @@ static void msginfo_set_mime_flags(GNode *node, gpointer data) strcmp(mimeinfo->subtype, "x-pkcs7-signature") && strcmp(mimeinfo->subtype, "pkcs7-signature"))) procmsg_msginfo_set_flags(msginfo, 0, MSG_HAS_ATTACHMENT); - } else if (mimeinfo->disposition == DISPOSITIONTYPE_INLINE && - mimeinfo->id == NULL && - (strcmp(mimeinfo->subtype, "pgp-signature") && - strcmp(mimeinfo->subtype, "x-pkcs7-signature") && - strcmp(mimeinfo->subtype, "pkcs7-signature")) && - (procmime_mimeinfo_get_parameter(mimeinfo, "name") != NULL || - procmime_mimeinfo_get_parameter(mimeinfo, "filename") != NULL)) { - procmsg_msginfo_set_flags(msginfo, 0, MSG_HAS_ATTACHMENT); } /* don't descend below top level message for signed and encrypted info */