When detaching, comma in target file name or path will break link to local file because X-Mozilla-External-Attachment-URL is truncated at first comma
Categories
(MailNews Core :: Attachments, defect)
Tracking
(thunderbird_esr102 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr102 | --- | wontfix |
People
(Reporter: Joerg.Thoennes, Assigned: betterbird.project)
References
Details
(Whiteboard: [dataloss])
Attachments
(3 files)
Updated•18 years ago
|
Comment 1•18 years ago
|
||
Comment 2•17 years ago
|
||
Comment 3•17 years ago
|
||
Updated•16 years ago
|
Comment 6•16 years ago
|
||
Comment 7•16 years ago
|
||
Comment 8•16 years ago
|
||
Comment 9•12 years ago
|
||
Updated•12 years ago
|
Updated•12 years ago
|
Comment 11•12 years ago
|
||
Updated•12 years ago
|
Comment 12•9 years ago
|
||
Comment 13•7 years ago
|
||
Comment 15•5 years ago
|
||
This bug still exists. (Thunderbird 60.9.1, mbox file format).
I am using the attachment detach feature a lot. With this bug, I cannot trust it anymore.
Please please please fix this bug!
Thanks
Comment 16•5 years ago
|
||
Thunderbird 68.4.2 again truncates the link to a detached file at the first comma in the filename
See https://support.mozilla.org/en-US/questions/1278071#answer-1285865
Comment 17•5 years ago
|
||
Still exists in 68.6.0 (64-Bit) Linux.
Comment 18•5 years ago
|
||
Example of defective .eml with the errors highlighted.
Comment 19•4 years ago
|
||
Problem recurs under 68.12.1
Comment 20•4 years ago
|
||
Still defective in 78.3.1… what a shame.
Comment 21•4 years ago
|
||
Comment 22•3 years ago
|
||
Fifteen years later, Thunderbird 78.11.0. The bug is still there. It looks like all that needs to be done is add the comma in mDetachedFileUris() to the list of characters that need to be URLencoded, just like it is done for the space characters.
Comment 23•3 years ago
|
||
Val, can you please clarify this suggestion. mDetachedFileUris
is a list of URIs defined here:
https://searchfox.org/comm-central/rev/fa532a6d47183bed8d0a5016ff27e092f791c9e1/mailnews/base/src/nsMessenger.cpp#2319
So which "list of characters" are you referring to? You don't need to submit a patch, you could just copy the modified code into a comment here.
Comment 24•3 years ago
|
||
This is where the URI of the saved file is constructed:
https://searchfox.org/comm-central/rev/20577b15cbba0144791385497892348220fa3037/mailnews/base/src/nsMessenger.cpp#704-709
Apparently a comma is valid in a URI and not percent-encoded.
Later on, the damage happens here:
https://searchfox.org/comm-central/rev/20577b15cbba0144791385497892348220fa3037/mailnews/base/src/nsMessenger.cpp#2625
where URLs are strung together with a comma, and then later parsed here:
https://searchfox.org/comm-central/rev/20577b15cbba0144791385497892348220fa3037/mailnews/mime/src/mimeobj.cpp#172
The design issue lies in stringing file URLs together with a comma and later splitting at a comma, when a comma can be part of the file URLs.
A hacky one-line fix could be to percent-encode the comma before nsMessenger.cpp#2625. That's a bit like the suggestion in comment #22 which in itself is not a solution.
Comment 25•3 years ago
|
||
Comment 26•3 years ago
|
||
Great investigative work, Rachel! I think you pinned it. Your patch in comment #25 makes total sense to me. I looked for what I meant by saying the "list of characters" in comment #22 and I could not find it :-(
Updated•2 years ago
|
Assignee | ||
Comment 27•2 years ago
|
||
Comment 28•2 years ago
|
||
Comment on attachment 9331104 [details] [diff] [review]
350825-commas-detached-attachment.patch
Looks good, r=mkmelin
Updated•2 years ago
|
Comment 29•2 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/ebd51aa99865
Percent-encode commas in URI of detached attachment. r=mkmelin
Description
•