Closed Bug 1714525 Opened 4 years ago Closed 4 years ago

Thunderbird changes XML attachment

Categories

(MailNews Core :: Composition, defect)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1689804

People

(Reporter: mauromol, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0

Steps to reproduce:

Write a new e-mail (using Thunderbird 78.8.1 on Kubuntu Linux). Attach a .xml file. Send it to yourself (perhaps another mailbox).
Download new mail in the target mailbox with either Thunderbird or a webmail client (still working on the same Kubuntu system here). Save the attached XML file and look at the file contents (with a viewer that lets you see line breaks characters and/or an hexadecimal editor).

Actual results:

The e-mail being received contains a corrupt XML file, because LF characters are changed to CRLF. Also, a final line break at the end of the XML file is added.

This is how the XML file is attached in message source:

--------------DD0D580E78B63AE316996564
Content-Type: text/xml; charset=UTF-8;
name="IT01502640533_0007P.xml"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="IT01502640533_0007P.xml"

Changing mail.file_attach_binary to true, causes the attachment to be base64 encoded: in this way, the EOL characters are not corrupted, but still Thunderbird adds a new line break at the end of the file. The attachment is now added as:

--------------31F05C5C499FC10E5F9F37B6
Content-Type: text/xml;
name="IT01502640533_0007P.xml"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="IT01502640533_0007P.xml"

and ends with (last 3 lines reported here):

ICAgIDwvRmF0dHVyYUVsZXR0cm9uaWNhQm9keT4KPC9uczM6RmF0dHVyYUVsZXR0cm9uaWNh
PgoK
--------------31F05C5C499FC10E5F9F37B6--

Expected results:

The attached file should not be altered in any way BY DEFAULT. Line breaks should be preserved, I shouldn't need to change mail.file_attach_binary to true. In any case, no trailing extra EOL characters should be added in any case.

Additional note: it seems like the extra EOL at the end of the file was still present after setting mail.file_attach_binary to true because I re-sent the original mail with right click->edit as new message from the Sent folder on the previously sent e-mail.
Re-composing the mail from scratch and re-attaching the original file, seems not to add the extra line break, although I would have expected the above procedure ("edit as new message") not to corrupt the attached file in any case.

Hence, I will stick with mail.file_attach_binary=true as a workaround for now, although bug #326303 (which seems to be still open) worries me.

Likely fixed in TB 78.10.1: https://www.thunderbird.net/en-US/thunderbird/78.10.1/releasenotes/ via backout of bug 1689804. See bug 1707852 for a similar complaint.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.