Fix so attachment without Content-ID is not an inline attachment (#5905)

pull/6320/head
Aleksander Machniak 7 years ago
parent e9d38e847c
commit 5e3868eb10

@ -856,7 +856,7 @@ class rcube_message
}
// Any non-inline attachment
if (!preg_match('/^inline/i', $mail_part->disposition)) {
if (!preg_match('/^inline/i', $mail_part->disposition) || empty($mail_part->headers['content-id'])) {
// Content-Type name regexp according to RFC4288.4.2
if (!preg_match('/^[a-z0-9!#$&.+^_-]+\/[a-z0-9!#$&.+^_-]+$/i', $part_mimetype)) {
// replace malformed content type with application/octet-stream (#1487767)

Loading…
Cancel
Save