summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-05-19 07:57:06 +0000
committeralecpl <alec@alec.pl>2010-05-19 07:57:06 +0000
commit9d5c834332e553429b5b4c700acea6927d496d6a (patch)
tree52af85f521cf8ab93126206cfcef1302e9a79522 /program
parentb62a0d2d23db19f3e69937de0f162294c98cdbc9 (diff)
- Fix %00 character in winmail.dat attachments names (#1486738)
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 768e8337a..cc1f9c56a 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -3393,13 +3393,13 @@ class rcube_imap
foreach ($tnef_arr as $winatt) {
$tpart = new rcube_message_part;
- $tpart->filename = $winatt["name"];
+ $tpart->filename = trim($winatt['name']);
$tpart->encoding = 'stream';
- $tpart->ctype_primary = $winatt["type0"];
- $tpart->ctype_secondary = $winatt["type1"];
- $tpart->mimetype = strtolower($winatt["type0"] . "/" . $winatt["type1"]);
+ $tpart->ctype_primary = trim(strtolower($winatt['type0']));
+ $tpart->ctype_secondary = trim(strtolower($winatt['type1']));
+ $tpart->mimetype = $tpart->ctype_primary . '/' . $tpart->ctype_secondary;
$tpart->mime_id = "winmail." . $part->mime_id . ".$pid";
- $tpart->size = $winatt["size"];
+ $tpart->size = $winatt['size'];
$tpart->body = $winatt['stream'];
$tnef_parts[] = $tpart;