From bf9da5df619194ce740e31f7c19ec3b4a19a26cc Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Thu, 15 Aug 2024 12:24:43 +0200 Subject: [PATCH] Fetch all msg headers also for images to always get Content-Location Previously all headers were only fetched for message/rfc822, or if the Content-Type's "name" parameter was set, or if a Content-ID was set. The RFC doesn't require neither the "name" parameter nor a Content-ID for using Content-Location, though, so we shouldn't depend on those. Instead now all headers are also fetched if the main part of the Content-Type is "image", to catch more cases. --- program/lib/Roundcube/rcube_imap.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index eb69615c5d0..d442b1b6069 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -2230,9 +2230,9 @@ protected function structure_part($part, $count = 0, $parent = '', $mime_headers } } - // fetch message headers if message/rfc822 or named part (could contain Content-Location header) + // fetch message headers if message/rfc822 or image or named part (could contain Content-Location header) if ( - $struct->ctype_primary == 'message' + $struct->ctype_primary == 'message' || $struct->ctype_primary == 'image' || (!empty($struct->ctype_parameters['name']) && !empty($struct->content_id)) ) { if (empty($mime_headers)) {