[PATCH] Re-opening a draft with text/plain attachment loses attachment
|Reported by:||tvk||Owned by:||till|
If you re-open a draft with a text/plain (in fact, any text/*) attachment, the attachment will not be displayed and is effectively lost. I can imagine that this problem will also occur when forwarding a message with text/plain attachments, but have not tested that.
Steps to reproduce:
- Create a new message
- Add recipients, subject, some mail text
- Add one or more attachments of MIME type text/plain (just create a .txt file with your favourite editor)
- Save the message as a draft ---> attachment is saved correctly (verified on IMAP server)
- Go to the Drafts folder. The message will have an attachment paper clip symbol next to it.
- Re-open the draft
- The attachment is gone...
The problem lies in roundcubemail/program/steps/mail/compose.inc:886. This if statement excludes all MIME parts of type text/* and message/* from being displayed as attachments. This is presumably done to make sure that no body part (text or html) will show up as an attachment. I would suggest instead to just check for the existence of a Content-Disposition: attachment or inline header in the MIME part. If there is one, the part should be displayed as an attachment.
Please see the attached patch against r921, which implements this.
Change History (4)
Changed 5 years ago by tvk
comment:1 Changed 5 years ago by thomasb
- Milestone set to 0.1-stable
- Severity changed from major to normal