[balsa] IMAP: fix multipart crypto operations
- From: Albrecht Dreß <albrecht src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] IMAP: fix multipart crypto operations
- Date: Sun, 24 Jan 2021 15:40:53 +0000 (UTC)
commit f4fcbcffa24eab2283e2da38c447421c2c249d1d
Author: Albrecht Dreß <albrecht dress arcor de>
Date: Sun Jan 24 16:41:09 2021 +0100
IMAP: fix multipart crypto operations
Enforce loading the whole IMAP message iff the MIME type is
multipart/(encrypted|multipart). Rationale: loading only the first part
of such messages prevents decryption or signature check.
Signed-off-by: Albrecht Dreß <albrecht dress arcor de>
libbalsa/mailbox_imap.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/libbalsa/mailbox_imap.c b/libbalsa/mailbox_imap.c
index c672b1686..dbe4091d8 100644
--- a/libbalsa/mailbox_imap.c
+++ b/libbalsa/mailbox_imap.c
@@ -2235,7 +2235,9 @@ libbalsa_mailbox_imap_fetch_structure(LibBalsaMailbox *mailbox,
LIBBALSA_MESSAGE_GET_LENGTH(message)<8192 ||
(headers != NULL &&
(headers->content_type == NULL ||
- !g_mime_content_type_is_type(headers->content_type, "multipart", "*"))) ){
+ !g_mime_content_type_is_type(headers->content_type, "multipart", "*") ||
+ g_mime_content_type_is_type(headers->content_type, "multipart", "signed") ||
+ g_mime_content_type_is_type(headers->content_type, "multipart", "encrypted"))) ){
/* we could optimize this part a little bit: we do not need to
* keep reopening the stream. */
GMimeStream *stream =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]