diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2013-04-10 23:12:23 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2013-04-10 23:12:23 +0200 |
commit | a021d6f1873be1df373ad9cd4985aebb1198c230 (patch) | |
tree | 73a8513a6c67c1ad1dce401a2114bb5daa0e9bd6 /program/lib/Roundcube | |
parent | ce31c026c2d399b0b6f2665c8252e5245ad8f48d (diff) |
Skip filename suffix check for embedded images; return blocked.gif instead of HTML warning when embedded (#1489029)
Diffstat (limited to 'program/lib/Roundcube')
-rw-r--r-- | program/lib/Roundcube/rcube_message.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php index 69735fc52..cfe501ba5 100644 --- a/program/lib/Roundcube/rcube_message.php +++ b/program/lib/Roundcube/rcube_message.php @@ -149,12 +149,13 @@ class rcube_message * Compose a valid URL for getting a message part * * @param string $mime_id Part MIME-ID + * @param mixed $embed Mimetype class for parts to be embedded * @return string URL or false if part does not exist */ public function get_part_url($mime_id, $embed = false) { if ($this->mime_parts[$mime_id]) - return $this->opt['get_url'] . '&_part=' . $mime_id . ($embed ? '&_embed=1' : ''); + return $this->opt['get_url'] . '&_part=' . $mime_id . ($embed ? '&_embed=1&_mimeclass=' . $embed : ''); else return false; } @@ -642,7 +643,7 @@ class rcube_message $img_regexp = '/^image\/(gif|jpe?g|png|tiff|bmp|svg)/'; foreach ($this->inline_parts as $inline_object) { - $part_url = $this->get_part_url($inline_object->mime_id, true); + $part_url = $this->get_part_url($inline_object->mime_id, $inline_object->ctype_primary); if (isset($inline_object->content_id)) $a_replaces['cid:'.$inline_object->content_id] = $part_url; if ($inline_object->content_location) { |