6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
8/8/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#11390] tnef: UTF-16 encoded mime type not recognized
*
Your Email Address
*
Spam protection
Enter the letters below:
__..__ . ..__ . , (__ [ __|__|[__) \./ .__)[_./| || \ |
Comment
> when mime-type (and other properties) are UTF-16 encoded -- zeroes in > 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 >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers