sequence "bla-bla.\nFrom" in plaintext attachments becomes "bla-bla.\n>From"
Categories
(MailNews Core :: Attachments, defect)
Tracking
(Not tracked)
People
(Reporter: s_i_m, Unassigned)
References
(Depends on 2 open bugs)
Details
(Whiteboard: [patchlove][needs updated patch][stalled on blockers?])
Attachments
(2 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
image/gif
|
Details |
Comment 2•22 years ago
|
||
Comment 3•22 years ago
|
||
Comment 4•22 years ago
|
||
Comment 6•21 years ago
|
||
Comment 7•21 years ago
|
||
Updated•21 years ago
|
Comment 10•21 years ago
|
||
Comment 11•21 years ago
|
||
Comment 12•21 years ago
|
||
Comment 13•20 years ago
|
||
Comment 14•20 years ago
|
||
Reporter | ||
Comment 15•20 years ago
|
||
Updated•20 years ago
|
Updated•20 years ago
|
Updated•20 years ago
|
Comment 16•19 years ago
|
||
Comment 17•19 years ago
|
||
Comment 18•19 years ago
|
||
Comment 19•19 years ago
|
||
Comment 20•18 years ago
|
||
Comment 21•16 years ago
|
||
Comment 22•16 years ago
|
||
Comment 23•16 years ago
|
||
Comment 24•16 years ago
|
||
Assignee | ||
Updated•16 years ago
|
Comment 26•13 years ago
|
||
Comment 27•13 years ago
|
||
Comment 28•13 years ago
|
||
Comment 29•13 years ago
|
||
Comment 30•13 years ago
|
||
Comment 31•13 years ago
|
||
Comment 32•13 years ago
|
||
Updated•12 years ago
|
Comment 33•12 years ago
|
||
Comment 34•12 years ago
|
||
Updated•5 years ago
|
Comment 35•5 years ago
|
||
I wrote myself a tiny message to check the state of this bug with Thunderbird 60.8.0 (64-bit). My Sent folder if fed by BCC, so that's where the message arrived. For historical reasons, the IMAP folder is a local file, not a maildir. However, the message was not modified:
my ImapMail/server folder$ tail -35 Sent |hd
00000000 0d 0a 0d 0a 0d 0a 46 72 6f 6d 20 2d 20 4d 6f 6e |......From - Mon|
00000010 20 4a 75 6c 20 32 32 20 31 32 3a 30 37 3a 35 30 | Jul 22 12:07:50|
00000020 20 32 30 31 39 0a 58 2d 4d 6f 7a 69 6c 6c 61 2d | 2019.X-Mozilla-|
00000030 53 74 61 74 75 73 3a 20 30 30 30 31 0a 58 2d 4d |Status: 0001.X-M|
00000040 6f 7a 69 6c 6c 61 2d 53 74 61 74 75 73 32 3a 20 |ozilla-Status2: |
00000050 30 30 30 30 30 30 30 30 0a 44 65 6c 69 76 65 72 |00000000.Deliver|
00000060 65 64 2d 54 6f 3a 20 61 6c 65 2d 73 65 6e 74 40 |ed-To: ale-sent@|
00000070 74 61 6e 61 2e 69 74 0d 0a 52 65 74 75 72 6e 2d |tana.it..Return-|
00000080 50 61 74 68 3a 20 3c 76 65 73 65 6c 79 40 74 61 |Path: <vesely@ta|
00000090 6e 61 2e 69 74 3e 0d 0a 44 4b 49 4d 2d 53 69 67 |na.it>..DKIM-Sig|
000000a0 6e 61 74 75 72 65 3a 20 76 3d 31 3b 20 61 3d 72 |nature: v=1; a=r|
[...]
00000490 3d 75 73 2d 61 73 63 69 69 0d 0a 43 6f 6e 74 65 |=us-ascii..Conte|
000004a0 6e 74 2d 4c 61 6e 67 75 61 67 65 3a 20 65 6e 2d |nt-Language: en-|
000004b0 55 53 0d 0a 43 6f 6e 74 65 6e 74 2d 54 72 61 6e |US..Content-Tran|
000004c0 73 66 65 72 2d 45 6e 63 6f 64 69 6e 67 3a 20 37 |sfer-Encoding: 7|
000004d0 62 69 74 0d 0a 0d 0a 54 68 69 73 20 69 73 20 74 |bit....This is t|
000004e0 6f 20 63 68 65 63 6b 20 74 68 61 74 0d 0a 46 72 |o check that..Fr|
000004f0 6f 6d 20 64 6f 65 73 20 6e 6f 74 20 67 65 74 20 |om does not get |
00000500 71 75 6f 74 65 64 0d 0a 6f 72 20 64 6f 65 73 20 |quoted..or does |
00000510 69 74 3f 0d 0a |it?..|
The format somehow provides for tolerating \nFrom_ in the middle of a message. Then, I copied the message to local folders, and, surprise surprise, the local folders have a different format. The message was modified (and DKIM Verifier complained):
my Mail/Local_Folders$ tail -35 Sent|hd
00000000 46 72 6f 6d 20 2d 20 4d 6f 6e 20 4a 75 6c 20 32 |From - Mon Jul 2|
00000010 32 20 31 32 3a 30 38 3a 35 38 20 32 30 31 39 0a |2 12:08:58 2019.|
00000020 58 2d 4d 6f 7a 69 6c 6c 61 2d 53 74 61 74 75 73 |X-Mozilla-Status|
00000030 3a 20 30 30 30 31 0a 58 2d 4d 6f 7a 69 6c 6c 61 |: 0001.X-Mozilla|
00000040 2d 53 74 61 74 75 73 32 3a 20 30 30 30 30 30 30 |-Status2: 000000|
00000050 30 30 0a 58 2d 4d 6f 7a 69 6c 6c 61 2d 4b 65 79 |00.X-Mozilla-Key|
00000060 73 3a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |s: |
00000070 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
*
000000b0 20 20 20 0a 44 65 6c 69 76 65 72 65 64 2d 54 6f | .Delivered-To|
000000c0 3a 20 61 6c 65 2d 73 65 6e 74 40 74 61 6e 61 2e |: ale-sent@tana.|
000000d0 69 74 0d 0a 52 65 74 75 72 6e 2d 50 61 74 68 3a |it..Return-Path:|
000000e0 20 3c 76 65 73 65 6c 79 40 74 61 6e 61 2e 69 74 | <vesely@tana.it|
000000f0 3e 0d 0a 44 4b 49 4d 2d 53 69 67 6e 61 74 75 72 |>..DKIM-Signatur|
[...]
000004e0 69 6e 3b 20 63 68 61 72 73 65 74 3d 75 73 2d 61 |in; charset=us-a|
000004f0 73 63 69 69 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 61 |scii..Content-La|
00000500 6e 67 75 61 67 65 3a 20 65 6e 2d 55 53 0d 0a 43 |nguage: en-US..C|
00000510 6f 6e 74 65 6e 74 2d 54 72 61 6e 73 66 65 72 2d |ontent-Transfer-|
00000520 45 6e 63 6f 64 69 6e 67 3a 20 37 62 69 74 0d 0a |Encoding: 7bit..|
00000530 0d 0a 54 68 69 73 20 69 73 20 74 6f 20 63 68 65 |..This is to che|
00000540 63 6b 20 74 68 61 74 0d 0a 3e 46 72 6f 6d 20 64 |ck that..>From d|
00000550 6f 65 73 20 6e 6f 74 20 67 65 74 20 71 75 6f 74 |oes not get quot|
00000560 65 64 0d 0a 6f 72 20 64 6f 65 73 20 69 74 3f 0d |ed..or does it?.|
00000570 0a 0a |..|
I also noticed a naked \n and lots of spaces around X-Mozilla-Keys.
Comment 36•4 years ago
|
||
To me it looks like this bug, at least as described in comment 0 and in several duplicates, is no longer an issue. The fix seems to be the fact that text attachments are now base64 encoded. This solution was suggested in comment 7 but I'm pretty sure base64 encoding of text attachments was not done in response to this bug but, as a side-effect, fixed this bug.
There also does not seem to be a problem with body lines beginning with "From " in general with TB generated mbox files since on composing "blank stuffing" is used so no text line begins with "From "
but become " From "
and the leading blank is removed before displaying the message. But this is not really the subject of this bug.
I tried to duplicate Alessandro's comment 35 description. I composed an email with a leading "From " in the body and saved it to an imap mbox storage. The "stuffed blank" was present before the "From" but displayed with no blank. On copy to a Local Folder, the message was not quoted with ">" and had no leading space. The Local Folder mbox file did contain the stuffed space before the From. But, again, this is not really the subject of this bug since it doesn't involve an attachment. Or does it, maybe I'm reading the memory dumps wrong?
So for now, I'm marking this as INVALID.
Edited P/S: Text attachments by default are not displayed inline unless pref mail.inline_attachments.text is set true. So, even without base64 encoding, text attachments will not, by default, cause a problem when lines begin with "From ".
However, 3rd party mbox or eml files that don't have "blank stuffed" or ">" escaped "From " lines will start a new message at that point when placed in a Local Folder (again, not a concern of this bug).
PP/S: I found this bug report while browsing the Import/Export Tools code here:
https://github.com/thundernest/import-export-tools-ng/blob/master/src/chrome/content/mboximport/exportTools.js#L2001
Description
•