fix: unknown content-disposition type should be treated as attachment (#6002)

pull/6072/head
Brendan Braybrook 7 years ago committed by Aleksander Machniak
parent 5e31411819
commit 6843668b2b

@ -2104,7 +2104,10 @@ class rcube_imap extends rcube_storage
if (is_array($part[$di]) && count($part[$di]) == 2) {
$struct->disposition = strtolower($part[$di][0]);
if ($struct->disposition && $struct->disposition !== 'inline' && $struct->disposition !== 'attachment') {
// RFC2183, Section 2.8 - unrecognized type should be treated as "attachment"
$struct->disposition = 'attachment';
}
if (is_array($part[$di][1])) {
for ($n=0; $n<count($part[$di][1]); $n+=2) {
$struct->d_parameters[strtolower($part[$di][1][$n])] = $part[$di][1][$n+1];

Loading…
Cancel
Save