6.0.0-alpha12
6/12/25

[#5251] Forward multipart with qp and base64 gives incorrectly encoded MIME (sub)part in mail
Summary Forward multipart with qp and base64 gives incorrectly encoded MIME (sub)part in mail
Queue IMP
Queue Version 4.1.3
Type Bug
State Duplicate
Priority 2. Medium
Owners
Requester horde-bugs (at) conuropsis (dot) org
Created 04/12/2007 (6636 days ago)
Due
Updated 04/22/2008 (6260 days ago)
Assigned 04/22/2008 (6260 days ago)
Resolved 04/22/2008 (6260 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/22/2008 06:08:09 PM Michael Slusarz Comment #13 Reply to this comment
We are no longer providing bugfixes for the 4.1 branch, only security fixes.
04/22/2008 05:49:05 PM sherpya (at) netfarm (dot) it Comment #12 Reply to this comment
Works for me fine on IMP 4.2.  Duplicate of Ticket 3381 as previously
mentioned.
not exactly, 4.2 has a different codebase, so fixed in HEAD do not 
apply to 4.1.x

the currently stable branch is 4.1 and debian etch still uses 4.1.3

so it's not always possible to upgrade, I suggest (if my small patch 
has no side effects)

to apply to next 4.1.x when it will be out, tough no urgent



if I understand the code, the bug will apply to all text/* attachments 
that are in base64

since



case 'text':

...

will never leave the encoding to base64


04/22/2008 04:54:51 AM Michael Slusarz Comment #11
State ⇒ Duplicate
Reply to this comment
Works for me fine on IMP 4.2.  Duplicate of Ticket 3381 as previously 
mentioned.
04/22/2008 04:28:19 AM Chuck Hagenbuch Comment #10
State ⇒ Feedback
Reply to this comment
If that fixes any problems, it'd imply that some values were not being 
reset correctly in some cases - or am I misinterpreting? Michael? :)
04/21/2008 04:05:44 PM sherpya (at) netfarm (dot) it Comment #9
New Attachment: horde-forward-fix.diff Download
Reply to this comment
I upgraded to IMP 4.1.4 and still hit the bug. I haven't upgraded to
latest horde / php libraries etc, though. I'll try that and see
whether that makes it disappear.
Try this simple patch,

Someone more familiar with the horde code could please check for side effects?
04/19/2007 06:06:18 AM horde-bugs (at) conuropsis (dot) org Comment #8 Reply to this comment
I upgraded to IMP 4.1.4 and still hit the bug. I haven't upgraded to 
latest horde / php libraries etc, though. I'll try that and see 
whether that makes it disappear.
04/18/2007 10:35:26 PM Jan Schneider Comment #7 Reply to this comment
Works perfectly for me. Try IMP 4.1.4.
04/17/2007 07:41:58 AM horde-bugs (at) conuropsis (dot) org Comment #6
New Attachment: MSG_NOBUG Download
Reply to this comment
Here is a similar, but shorter, message that does _not_ trigger the bug.
04/17/2007 07:39:13 AM horde-bugs (at) conuropsis (dot) org Comment #5
New Attachment: MSG_BUG Download
Reply to this comment
Here is a message that triggers this bug.



The bug seems to be length-related; if one puts only one "lorem ipsum" 
paragraph in the text/html part, then the bug is _not_ triggered.


04/16/2007 11:10:11 PM Michael Slusarz Comment #4 Reply to this comment
We can't do anything if we don't have the message source.
04/14/2007 06:21:09 AM horde-bugs (at) conuropsis (dot) org Comment #3 Reply to this comment
I've read bug 3381 and nothing in there speaks about wrong encoding of 
a MIME subpart; bug 3381 is about putting a copy of the text/plain 
part in the body of the new message and putting the MIME parts of the 
forwarded message in the new message. Bug reporter was arguing that 
one should not do both.



I wasn't arguing that question, I was saying that one MIME subpart of 
the forwarded message ends up with a wrong content-transfer-encoding 
header.



The result of this bug is that, when reading the new message with a 
MUA that will choose text/html over text/plain in a 
multipart/alternative (such as MS Outlook), one sees something like:



PGJvZHkgYmdjb2xvcj0iI0ZGRkZGRiI+PEI+PEZPTlQgRkFDRT0iQXJpYWwiIFNJWkU9NSBD



that is the message in its base64-encoded form. The MUA won't decode 
it because the header doesn't say "content-tranfer-encoding: base64" 
as it should, but it says "content-transfer-encoding: 
quoted-printable". Or alternatively, it should actually be transcoded 
from base64 (how it was in the forwareded message) into 
quoted-printable.





What is possible is that the fix for 3381 fixes this as a side-effect.



The bug log of 3381 isn't clear on whether it is supposed to be fixed 
in 4.1.4 or only in HEAD. Anyway, I have installed 4.1.4, and this bug 
(5251) is still present.
04/13/2007 09:47:07 PM Chuck Hagenbuch Comment #2
State ⇒ Duplicate
Reply to this comment
I'm 99% certain this is a duplicate of bug 3381.
04/12/2007 04:29:57 PM horde-bugs (at) conuropsis (dot) org Comment #1
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Queue ⇒ IMP
Summary ⇒ Forward multipart with qp and base64 gives incorrectly encoded MIME (sub)part in mail
Type ⇒ Bug
Reply to this comment
One of my users got a mail with the following MIME structure:

1 <no description>                           [multipa/Alternativ, 7bit, 9.0K]

2 &#32;&#9500;&#9472;>Message in clear text           [text/plain, 
quoted, us-ascii, 4.8K]

3 &#32;&#9492;&#9472;>Message in HTML form       [text/html, base64, 
iso-8859-1, 3.7K]



when he forwards it, it gives a mail with the following structure, 
where the text of the forwarded message is in part 1 _and_ the whole 
forwarded message is included as a MIME part:



   I     1 <no description>                       [text/plain, quoted, 
iso-8859-1, 5.4K]

   I     2 <no description>                       [multipa/alternativ, 
7bit, 9.0K]

   I     3 &#32;&#9500;&#9472;>Message in clear text       
[text/plain, quoted, iso-8859-1, 4.8K]

   I     4 &#32;&#9492;&#9472;>Message in HTML form   [text/html, 
quoted, iso-8859-1, 3.7K]



The problem is that the contents of the subpart whose MIME headers say 
"text/html, quoted, iso-8859-1" is actually base64; probably the 
Content-Transfer-Encoding in the MIME header is the one of the 
previous (text/plain) subpart, but it didn't actually get converted 
from base64 to quoted printable. Or something like that. Actually, I 
find it weird that the charset and transfer-encoding are changed at all.



Beginning of the erroneous part:



--AGENTID00131719-=_sMcQfL3yqRNdc9lqwCKbprFWr

Content-Type: text/html;

         charset=iso-8859-1

Content-Description: Message in HTML form

Content-Disposition: inline

Content-Transfer-Encoding: quoted-printable



PGJvZHkgYmdjb2xvcj0iI0ZGRkZGRiI+PEI+PEZPTlQgRkFDRT0iQXJpYWwiIFNJWkU9NSBD


Saved Queries