Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing message body parts on reply/forward #7568

Closed
mharjac opened this issue Aug 24, 2020 · 4 comments
Closed

Missing message body parts on reply/forward #7568

mharjac opened this issue Aug 24, 2020 · 4 comments

Comments

@mharjac
Copy link

mharjac commented Aug 24, 2020

One of my users hit same issue twice with messages received from two different senders. Both messages were sent from Apple Mail and had 5 or more attachments.
Everything looks OK in reading pane: https://imgur.com/a/GaTcv2f
but, message parts are missing when replying/forwarding: https://imgur.com/a/uKxofJ2
Roundcube version in use: 1.4.8

Here is stripped message example which triggers the issue:

Return-Path: <[email protected]>
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from [192.168.100.7] (1-1-2-170.domain.com [1.1.2.170])
	by mail.domain.com (Postfix) with ESMTPSA id 617F91C8247B;
	Tue, 18 Aug 2020 10:22:53 +0200 (CEST)
From: User2 <[email protected]>
Content-Type: multipart/alternative;
	boundary=Apple-Mail-0E53E023-AF3A-4FD3-AFD9-673756F0B0E7
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (1.0)
Date: Tue, 18 Aug 2020 10:22:53 +0200
Subject: =?utf-8?Q?Fwd:_test123?=
Message-Id: <[email protected]>
References: <[email protected]>
To: [email protected]
X-Mailer: iPhone Mail (16G102)


--Apple-Mail-0E53E023-AF3A-4FD3-AFD9-673756F0B0E7
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

BLAH1

--Apple-Mail-0E53E023-AF3A-4FD3-AFD9-673756F0B0E7
Content-Type: multipart/mixed;
	boundary=Apple-Mail-37EEF2C7-C44E-446C-A2E8-971B37866CB1
Content-Transfer-Encoding: 7bit


--Apple-Mail-37EEF2C7-C44E-446C-A2E8-971B37866CB1
Content-Type: text/html;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D=
utf-8"></head><body dir=3D"auto">BLAH1</body></html>=

--Apple-Mail-37EEF2C7-C44E-446C-A2E8-971B37866CB1
Content-Type: text/x-moz-deleted; name="Deleted: 117306026_683106645751605_1366933476413906913_o.jpg"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="Deleted: 117306026_683106645751605_1366933476413906913_o.jpg"
X-Mozilla-Altered: AttachmentDeleted; date="Fri Aug 21 13:26:19 2020"

You deleted an attachment from this message. The original MIME headers for the attachment were:
Content-Type: image/jpeg;
	name=117306026_683106645751605_1366933476413906913_o.jpg;
	x-apple-part-url=f_kdznow813
Content-Disposition: inline;
	filename=117306026_683106645751605_1366933476413906913_o.jpg
Content-Transfer-Encoding: base64


--Apple-Mail-37EEF2C7-C44E-446C-A2E8-971B37866CB1
Content-Type: text/html;
	charset=us-ascii
Content-Transfer-Encoding: 7bit

<html><body dir="auto"><head><meta http-equiv="content-type" content="text/html; "></head><div><blockquote type="cite"><div dir="ltr"></div></blockquote><blockquote type="cite"><div dir="ltr"></div></blockquote></div></body></html>
--Apple-Mail-37EEF2C7-C44E-446C-A2E8-971B37866CB1
Content-Type: text/x-moz-deleted; name="Deleted: 117287314_683106775751592_8195808575785916353_o.jpg"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="Deleted: 117287314_683106775751592_8195808575785916353_o.jpg"
X-Mozilla-Altered: AttachmentDeleted; date="Fri Aug 21 13:26:19 2020"

You deleted an attachment from this message. The original MIME headers for the attachment were:
<BR><FIELDSET CLASS="mimeAttachmentHeader"><LEGEND CLASS="mimeAttachmentHeaderName">117287314_683106775751592_8195808575785916353_o.jpg</LEGEND></FIELDSET>Content-Type: image/jpeg;
	name=117287314_683106775751592_8195808575785916353_o.jpg;
	x-apple-part-url=f_kdznow7i1
Content-Disposition: inline;
	filename=117287314_683106775751592_8195808575785916353_o.jpg
Content-Transfer-Encoding: base64


--Apple-Mail-37EEF2C7-C44E-446C-A2E8-971B37866CB1
Content-Type: text/html;
	charset=us-ascii
Content-Transfer-Encoding: 7bit

<html><body dir="auto"><head><meta http-equiv="content-type" content="text/html; "></head><div><blockquote type="cite"><div dir="ltr"></div></blockquote><blockquote type="cite"><div dir="ltr"></div></blockquote></div></body></html>
--Apple-Mail-37EEF2C7-C44E-446C-A2E8-971B37866CB1
Content-Type: text/x-moz-deleted; name="Deleted: 117301449_683106849084918_791103366348973902_o.png"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="Deleted: 117301449_683106849084918_791103366348973902_o.png"
X-Mozilla-Altered: AttachmentDeleted; date="Fri Aug 21 13:26:19 2020"

You deleted an attachment from this message. The original MIME headers for the attachment were:
<BR><FIELDSET CLASS="mimeAttachmentHeader"><LEGEND CLASS="mimeAttachmentHeaderName">117301449_683106849084918_791103366348973902_o.png</LEGEND></FIELDSET>Content-Type: image/png;
	name=117301449_683106849084918_791103366348973902_o.png;
	x-apple-part-url=f_kdznow7s2
Content-Disposition: inline;
	filename=117301449_683106849084918_791103366348973902_o.png
Content-Transfer-Encoding: base64


--Apple-Mail-37EEF2C7-C44E-446C-A2E8-971B37866CB1
Content-Type: text/html;
	charset=us-ascii
Content-Transfer-Encoding: 7bit

<html><body dir="auto"><head><meta http-equiv="content-type" content="text/html; "></head><div><blockquote type="cite"><div dir="ltr"></div></blockquote><blockquote type="cite"><div dir="ltr"></div></blockquote></div></body></html>
--Apple-Mail-37EEF2C7-C44E-446C-A2E8-971B37866CB1
Content-Type: text/x-moz-deleted; name="Deleted: 117266734_683106442418292_1006604132589318431_o.png"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="Deleted: 117266734_683106442418292_1006604132589318431_o.png"
X-Mozilla-Altered: AttachmentDeleted; date="Fri Aug 21 13:26:19 2020"

You deleted an attachment from this message. The original MIME headers for the attachment were:
<BR><FIELDSET CLASS="mimeAttachmentHeader"><LEGEND CLASS="mimeAttachmentHeaderName">117266734_683106442418292_1006604132589318431_o.png</LEGEND></FIELDSET>Content-Type: image/png;
	name=117266734_683106442418292_1006604132589318431_o.png;
	x-apple-part-url=f_kdznow6t0
Content-Disposition: inline;
	filename=117266734_683106442418292_1006604132589318431_o.png
Content-Transfer-Encoding: base64


--Apple-Mail-37EEF2C7-C44E-446C-A2E8-971B37866CB1
Content-Type: text/html;
	charset=us-ascii
Content-Transfer-Encoding: 7bit

<html><body dir="auto"><head><meta http-equiv="content-type" content="text/html; "></head><div><blockquote type="cite"><div dir="ltr"></div></blockquote><blockquote type="cite"><div dir="ltr"></div></blockquote></div></body></html>
--Apple-Mail-37EEF2C7-C44E-446C-A2E8-971B37866CB1
Content-Type: text/x-moz-deleted; name="Deleted: 117313759_683106935751576_5677988327145661722_o.jpg"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="Deleted: 117313759_683106935751576_5677988327145661722_o.jpg"
X-Mozilla-Altered: AttachmentDeleted; date="Fri Aug 21 13:26:19 2020"

You deleted an attachment from this message. The original MIME headers for the attachment were:
<BR><FIELDSET CLASS="mimeAttachmentHeader"><LEGEND CLASS="mimeAttachmentHeaderName">117313759_683106935751576_5677988327145661722_o.jpg</LEGEND></FIELDSET>Content-Type: image/jpeg;
	name=117313759_683106935751576_5677988327145661722_o.jpg;
	x-apple-part-url=f_kdznow8a4
Content-Disposition: inline;
	filename=117313759_683106935751576_5677988327145661722_o.jpg
Content-Transfer-Encoding: base64


--Apple-Mail-37EEF2C7-C44E-446C-A2E8-971B37866CB1--

--Apple-Mail-0E53E023-AF3A-4FD3-AFD9-673756F0B0E7--
@alecpl
Copy link
Member

alecpl commented Aug 25, 2020

Are we talking about this message source or the one before image attachments has been deleted? Because for this message, I'd say that the preview is also not really correct. There might be a few issues here.

For one, multipart/mixed inside of multipart/alternative is unusual. Another thing is how Roundcube handles Content-Disposition: inline. Finally, we could do better with text/x-moz-deleted attachments content.

@mharjac
Copy link
Author

mharjac commented Aug 25, 2020

Original message looks fine in preview, I don't have any complaints about that :) My only issue is missing content in forwarding. Feel free to contact me if you need any additional info or if I can help somehow.

@alecpl alecpl modified the milestones: later, 1.4.9 Aug 30, 2020
alecpl added a commit that referenced this issue Aug 30, 2020
@alecpl
Copy link
Member

alecpl commented Aug 30, 2020

It was a more trivial bug than I anticipated. Fixed.

@alecpl alecpl closed this as completed Aug 30, 2020
@mharjac
Copy link
Author

mharjac commented Sep 1, 2020

I applied your patch to my current instance of 1.4.8 and it works perfectly! Thank you very much for your effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants