summaryrefslogtreecommitdiff
path: root/program/steps/mail/get.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-05-14 09:41:30 +0200
committerAleksander Machniak <alec@alec.pl>2013-05-14 09:42:01 +0200
commit05b5f969d5c10850291ae413b89461ca1f6bcc5d (patch)
tree9e5e8d5011add498816c226efba786810685aa26 /program/steps/mail/get.inc
parentbde85428d69069637782d9507475df78890f08d0 (diff)
Fix problem where security warning was displayed for valid images with image/jpg type (#1489097)
Diffstat (limited to 'program/steps/mail/get.inc')
-rw-r--r--program/steps/mail/get.inc7
1 files changed, 2 insertions, 5 deletions
diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc
index bcc6f11bc..372757720 100644
--- a/program/steps/mail/get.inc
+++ b/program/steps/mail/get.inc
@@ -95,9 +95,7 @@ else if ($_GET['_thumb']) {
else if (strlen($pid = get_input_value('_part', RCUBE_INPUT_GET))) {
if ($part = $MESSAGE->mime_parts[$pid]) {
- $ctype_primary = strtolower($part->ctype_primary);
- $ctype_secondary = strtolower($part->ctype_secondary);
- $mimetype = sprintf('%s/%s', $ctype_primary, $ctype_secondary);
+ $mimetype = rcmail_fix_mimetype($part->mimetype);
// allow post-processing of the message body
$plugin = $RCMAIL->plugins->exec_hook('message_part_get',
@@ -107,7 +105,7 @@ else if (strlen($pid = get_input_value('_part', RCUBE_INPUT_GET))) {
exit;
// overwrite modified vars from plugin
- $mimetype = $plugin['mimetype'];
+ $mimetype = $plugin['mimetype'];
$extensions = rcube_mime::get_mime_extensions($mimetype);
if ($plugin['body'])
@@ -217,7 +215,6 @@ else if (strlen($pid = get_input_value('_part', RCUBE_INPUT_GET))) {
header("Content-Type: text/$ctype_secondary; charset=" . ($part->charset ? $part->charset : RCMAIL_CHARSET));
}
else {
- $mimetype = rcmail_fix_mimetype($mimetype);
header("Content-Type: $mimetype");
header("Content-Transfer-Encoding: binary");
}