[Tickets #3065] NEW: attachment filename with localized chars becomes corrupted on forwarding

bugs@bugs.horde.org bugs at bugs.horde.org
Mon Nov 28 23:22:12 PST 2005


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

Ticket URL: http://bugs.horde.org/ticket/?id=3065
-----------------------------------------------------------------------
 Ticket             | 3065
 Created By         | ag at netside.de
 Summary            | attachment filename with localized chars becomes corrupted on forwarding
 Queue              | IMP
 Version            | 4.0.4
 State              | Unconfirmed
 Priority           | 2. Medium
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


ag at netside.de (2005-11-28 23:22) wrote:

Since nobody on imp.lists.horde.org seems to have (had) a similar problem
i tried to figure out what happens on forwarding an email with an
attachment
whose name contains special characters - that means the filename needs to
be
encoded in e.g. 'ISO-8859-15'. The source-view of the message to be
forwarded
shows the filename is encoded already that way.

In "compose.php" the forwarded message is taken and completely copied
into the contents of a new message. The function 'attachFilesFromMessage'
is responsible for copying the all attachments by iterating through
every attachment and calling 'addMIMEPartAttachment' for every suitable
attachment. Within that function 'addMIMEPartAttachment' i lost track on
how the filename of the attachment is getting decoded or maybe its not
decoded what in my opinion would be wrong. Maybe this part resides in
'transferDecodeContents' but i am not sure now. Still decoding the sources
of
these routines myself :)

All i know is that on sending the forwarded message the filename is
corrupted already. Looks like its encoded twice. While building the
message to be handed over to sendmail i followed the process up to the
function 'buildAllAttachments'. Inside that function the attachments
turn out to be in a construct '$this->_cache' and every filename i get
from '$part->getName(true)' is corrupted already.

Now my hot guess is that the filename needs to be decoded before being
written into that '_cache'. 

Regards
Andreas




More information about the bugs mailing list