Summary | tnef: UTF-16 encoded mime type not recognized |
Queue | IMP |
Queue Version | FRAMEWORK_4 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | slusarz (at) horde (dot) org |
Requester | andrey012 (at) gmail (dot) com |
Created | 08/31/2012 (4701 days ago) |
Due | |
Updated | 10/15/2012 (4656 days ago) |
Assigned | |
Resolved | 09/03/2012 (4698 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
commit bba44b37974a6aca0a3da13ee2ab15081b0d82cc
Author: Michael M Slusarz <slusarz@horde.org>
Date: Mon Sep 3 01:24:02 2012 -0600
[mms] Fix parsing UTF-16 data in TNEF driver (
Bug #11390)(andrey012@gmail.com).
framework/Compress/lib/Horde/Compress/Tnef.php | 1 +
framework/Compress/package.xml | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/bba44b37974a6aca0a3da13ee2ab15081b0d82cc
commit bba44b37974a6aca0a3da13ee2ab15081b0d82cc
Author: Michael M Slusarz <slusarz@horde.org>
Date: Mon Sep 3 01:24:02 2012 -0600
[mms] Fix parsing UTF-16 data in TNEF driver (
Bug #11390)(andrey012@gmail.com).
framework/Compress/lib/Horde/Compress/Tnef.php | 1 +
framework/Compress/package.xml | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/bba44b37974a6aca0a3da13ee2ab15081b0d82cc
State ⇒ Resolved
Version ⇒ FRAMEWORK_4
commit bef0470c50af03230f46e54e272c276cc0af45a7
Author: Michael M Slusarz <slusarz@horde.org>
Date: Mon Sep 3 01:24:02 2012 -0600
[mms] Fix parsing UTF-16 data in TNEF driver (
Bug #11390)(andrey012@gmail.com).
framework/Compress/lib/Horde/Compress/Tnef.php | 1 +
framework/Compress/package.xml | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/bef0470c50af03230f46e54e272c276cc0af45a7
New Attachment: 11390.patch
case self::MAPI_ATTACH_MIME_TAG:
/* Is this ever set, and what is format? */
$attachment_data[0]['type'] =
preg_replace('/^(.*)\/.*/', '\1', $value);
+ $attachment_data[0]['type'] = str_replace("\0", '',
$attachment_data[0]['type']);
$attachment_data[0]['subtype'] =
preg_replace('/.*\/(.*)$/', '\1', $value);
$attachment_data[0]['subtype'] = str_replace("\0",
'', $attachment_data[0]['subtype']);
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ tnef: UTF-16 encoded mime type not recognized
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
type are not stripped correctly.
Here is piece of existing code:
case self::MAPI_ATTACH_MIME_TAG:
/* Is this ever set, and what is format? */
$attachment_data[0]['type'] =
preg_replace('/^(.*)\/.*/', '\1', $value);
$attachment_data[0]['subtype'] =
preg_replace('/.*\/(.*)$/', '\1', $value);
$attachment_data[0]['subtype'] = str_replace("\0",
'', $attachment_data[0]['subtype']);
You can see that zeroes are stripped in subtype but not in type.
AS a result JPEGs appear to be x-unknown/jpeg instead of image/jpeg