diff options
author | Aleksander Machniak <alec@alec.pl> | 2015-02-19 13:43:43 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2015-02-19 13:43:43 +0100 |
commit | 4a2a62de30eae35398dc1e6fcca99c469dd218e6 (patch) | |
tree | fc2bdcce6255ea535c055babe97b5b02904a0a77 /program/steps/mail/func.inc | |
parent | 50b04366ee7472272e2576d17c609e1d26345221 (diff) |
Fix needless security warning on BMP attachments display (#1490282)
Diffstat (limited to 'program/steps/mail/func.inc')
-rw-r--r-- | program/steps/mail/func.inc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 48d989954..c45fd2f97 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1959,9 +1959,16 @@ function rcmail_identity_select($MESSAGE, $identities = null, $compose_mode = 'r // Fixes some content-type names function rcmail_fix_mimetype($name) { + $map = array( + 'image/x-ms-bmp' => 'image/bmp', // #1490282 + ); + + if ($alias = $map[strtolower($name)]) { + $name = $alias; + } // Some versions of Outlook create garbage Content-Type: // application/pdf.A520491B_3BF7_494D_8855_7FAC2C6C0608 - if (preg_match('/^application\/pdf.+/', $name)) { + else if (preg_match('/^application\/pdf.+/', $name)) { $name = 'application/pdf'; } // treat image/pjpeg (image/pjpg, image/jpg) as image/jpeg (#1489097) |