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

pull/6005/head
Brendan Braybrook 7 years ago committed by Aleksander Machniak
parent da15d55665
commit 4574870adc

@ -2109,7 +2109,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