[Tickets #12127] utf-16 encoded text files MIME part header broken

noreply at bugs.horde.org noreply at bugs.horde.org
Mon Mar 18 14:04:05 UTC 2013


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/12127
------------------------------------------------------------------------------
  Ticket             | 12127
  Created By         | janne.peltonen at helsinki.fi
  Summary            | utf-16 encoded text files MIME part header broken
  Queue              | IMP
  Version            | 6.0.4
  Type               | Bug
  State              | Unconfirmed
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


janne.peltonen at helsinki.fi (2013-03-18 14:04) wrote:

Hi! If I try to send a utf-16 (little endian with the tag byte  
sequence FF FE at the beginning) encoded text file as an attachment  
and I've enabled saving attachments to the Sent folder with the  
message, IMP creates a very strange header for the MIME part of the  
attachment: all the values of the header keywords end up encoded as  
utf-16 (except that the Content-Transfer-Encoding loses the final NUL  
byte). Like this:

--clip--
--=_pRVOz2N9C9oTNFcAA1MfBg1
Content-Type: text/plain; charset=u^@t^@f^@-^@1^@6^@l^@e^@;
  name=m^@a^@a^@l^@a^@m^@p^@o^@1^@b^@.^@t^@x^@t
Content-Disposition: attachment;  
filename=m^@a^@a^@l^@a^@m^@p^@o^@1^@b^@.^@t^@x^@t^@;
  size=146736
Content-Transfer-Encoding: q^@u^@o^@t^@e^@d^@-^@p^@r^@i^@n^@t^@a^@b^@l^@e
--clip--

here, ^@ stands for the null byte. The MIME part headers should be  
7bit clean, and at least Sendmail apparently converts this to ASCII  
while sending, so the receiver gets the message as they should, but  
the IMAP backends do various things for the saved attachment. Cyrus,  
for instance, complains that the message contains NUL bytes and  
doesn't save it at all to the Sent folder - except for a buggy version  
I happen to be running...





More information about the bugs mailing list