From 3819e4e6400bf0cb3204b3262e3cfbcdf430c3d9 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 18 Jan 2020 18:31:06 +0100 Subject: [PATCH] Fix bug where message parts with no Content-Disposition header and no name were not listed on attachments list (#7117) --- CHANGELOG | 1 + program/lib/Roundcube/rcube_message.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index e19f90802..ceb18e9fe 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -17,6 +17,7 @@ CHANGELOG Roundcube Webmail - Fix unexpected error message when mail refresh involves folder auto-unsubscribe (#6923) - Fix recipient duplicates in print-view when the recipient list has been expanded (#7169) - Fix bug where files in skins/ directory were listed on skins list (#7180) +- Fix bug where message parts with no Content-Disposition header and no name were not listed on attachments list (#7117) RELEASE 1.4.2 ------------- diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php index e46adf01a..e28672a2d 100644 --- a/program/lib/Roundcube/rcube_message.php +++ b/program/lib/Roundcube/rcube_message.php @@ -878,6 +878,13 @@ class rcube_message $this->add_part($mail_part, 'attachment'); } + // Last resort, non-inline and non-text part of multipart/mixed message (#7117) + else if ($mimetype == 'multipart/mixed' + && $mail_part->disposition != 'inline' + && $primary_type && $primary_type != 'text' && $primary_type != 'multipart' + ) { + $this->add_part($mail_part, 'attachment'); + } } // if this is a related part try to resolve references