zendframework/zend-mime

MTOM messages with binary message-parts mallformed after splitMime

mannes opened this issue · 2 comments

After the splitMime function the content of a message containing a messagepart in binary (using with MTOM xop:Include) will get malformed. In my case a PDF becomes pretty much unreadable (still valid PDF but all images and markup are broken)

I'm pretty sure it's this line causing the problem
https://github.com/zendframework/zend-mime/blob/master/src/Decode.php#L30

It discards any \r character in the entire message, changing the content of the binary attachment and breaking it.

Thanks @mannes I forked the repo with your patch, which I patched some more ;-)
lvanderree@968599a

This repository has been closed and moved to laminas/laminas-mime; a new issue has been opened at laminas/laminas-mime#4.