From 9312ba2cb6c31774d7b5af40f48d6ec80e27d6d9 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Thu, 23 May 2013 09:36:00 -0400
Subject: [PATCH] Fix fatal error when parsing UUencoded messages (#1489119)

---
 CHANGELOG                               |    2 ++
 program/lib/Roundcube/rcube_message.php |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index acd41b2..7f465d8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,8 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
+- Fix fatal error when parsing UUencoded messages (#1489119)
+
 RELEASE 0.9.1
 -------------
 - Better German labels for from/to to avoid conflicts with 'sender' (#1489084)
diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php
index e10ed39..a8bcf6a 100644
--- a/program/lib/Roundcube/rcube_message.php
+++ b/program/lib/Roundcube/rcube_message.php
@@ -756,7 +756,7 @@
                 $uupart->size     = strlen($uupart->body);
                 $uupart->mime_id  = 'uu.' . $part->mime_id . '.' . $pid;
 
-                $ctype = rcube_mime::content_type($uupart->body, $uupart->filename, 'application/octet-stream', true);
+                $ctype = rcube_mime::file_content_type($uupart->body, $uupart->filename, 'application/octet-stream', true);
                 $uupart->mimetype = $ctype;
                 list($uupart->ctype_primary, $uupart->ctype_secondary) = explode('/', $ctype);
 

--
Gitblit v1.9.1