FileLink creates a link and attaches a file to the message too if drag'n'drop a file from a network share
Categories
(Thunderbird :: FileLink, defect)
Tracking
(thunderbird_esr68 fixed, thunderbird_esr78 fixed)
People
(Reporter: roman.yepishev, Assigned: rnons)
References
Details
Attachments
(2 files, 3 obsolete files)
6.78 KB,
image/png
|
Details | |
4.67 KB,
patch
|
mkmelin
:
review+
wsmwk
:
approval-comm-esr68+
wsmwk
:
approval-comm-esr78+
|
Details | Diff | Splinter Review |
Reporter | ||
Updated•12 years ago
|
Comment 2•12 years ago
|
||
Reporter | ||
Comment 4•12 years ago
|
||
Comment 5•12 years ago
|
||
Comment 6•12 years ago
|
||
Reporter | ||
Comment 7•12 years ago
|
||
Comment 8•12 years ago
|
||
Reporter | ||
Comment 9•12 years ago
|
||
Comment 10•12 years ago
|
||
Reporter | ||
Comment 11•12 years ago
|
||
Comment 12•12 years ago
|
||
Comment 13•12 years ago
|
||
Comment 14•12 years ago
|
||
Comment 15•12 years ago
|
||
Comment 16•12 years ago
|
||
Comment 17•12 years ago
|
||
Comment 18•12 years ago
|
||
Comment 19•11 years ago
|
||
Comment 20•11 years ago
|
||
Comment 21•11 years ago
|
||
Comment 23•10 years ago
|
||
Comment 24•10 years ago
|
||
Comment 25•10 years ago
|
||
Comment 26•9 years ago
|
||
Comment 27•9 years ago
|
||
Comment hidden (metoo) |
Comment 29•7 years ago
|
||
Comment 30•6 years ago
|
||
Comment hidden (metoo) |
Comment 33•4 years ago
|
||
Reproduced with Thunderbird 68.9.0 on Windows 7 with mapped windows share (mapped to a driver letter). See also bug 1640642
Comment 34•4 years ago
|
||
Reproduced with Thunderbird 68.9.0 on Windows 10 with both mapped and unmapped windows share and different Filelink providers (*cloud, Filelink for Plik). The "auto-save draft" option doesn't change the behavior.
Comment 35•4 years ago
|
||
So, further tests show different behaviour in subtly different scenarios (all on an IMAP mail account, in case it makes a difference):
- Attach as a regular attachment from letter-mapped network drive, then convert to linked file: works correctly
- Directly link file from letter-mapped network drive: both linked and attached
- Remove attachment before trying to send email: the link is removed with the attachment
- First try to send email, get "message too big" warning, cancel sending, then remove attachments: the links stay; this can serve as work-around.
- Link in any way (directly or by conversion) from UNC network path (\server\path\to\file): both linked and attached. Subcases 3.i and 3.ii as in 2.i and 2.ii
- Link in any way (directly or by conversion) from local filesystem: works correctly
Comment 36•4 years ago
|
||
I'd like to set a bug bounty for this bug. Is that generally accepted among Thunderbird developers? What is the preferred platform?
TIA
Comment 38•4 years ago
|
||
Hallo Walts48,
why is this bug not in status confirmed... I think it is deplorable to see quite a few people reproducing this bug and still pretending it is NEW (for 8 Years now).
Comment 39•4 years ago
|
||
I can confirm that an attachment from a windows share over UNC paths does also attach the file, which makes EVERY FileLinkProvider useless.
I can also confirm, that if the file is bigger than the max-mailsize-limit of the mail server the file-link "stays" in the mail body when the attachment is manually removed after getting a pop-up that the server might not send the mail because of size limit.
Please fix this nasty bug.
Comment 40•4 years ago
|
||
(In reply to Heinrich Hartl from comment #38)
Hallo Walts48,
why is this bug not in status confirmed... I think it is deplorable to see quite a few people reproducing this bug and still pretending it is NEW (for 8 Years now).
Confirmed and set to NEW in Comment 27.
Comment 41•4 years ago
|
||
(In reply to Johannes Endres from comment #36)
I'd like to set a bug bounty for this bug. Is that generally accepted among Thunderbird developers? What is the preferred platform?
I know one case where this has been done: bug 394216 comment #142 (I collected that and donated it to a good cause).
Do we have Windows developers these days? Ping?
Assignee | ||
Comment 42•4 years ago
|
||
I do have a Windows machine, I will see if I can reproduce next week.
Assignee | ||
Comment 43•4 years ago
|
||
If a network shared file is sent via cloud, handle it the same as a comp field local attachment so it won't be sent as a normal attachment. I didn't dig deep, but I tested it works on Windows.
Comment 44•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 45•4 years ago
|
||
Updated. Seems a bit different, I'm not sure if it's possible that on non-Windows platform, nsMsgIsLocalFile
returns false, but sendViaCloud
is true. But even if that's the case, perhaps it's still good to handle it as local.
Comment 46•4 years ago
|
||
Why don't you just fix nsMsgIsLocalFile(), it's only used in nsMsgSend.cpp:
https://searchfox.org/comm-central/search?q=nsMsgIsLocalFile&path=&case=false®exp=false
And while your there, move the function to nsMsgSend.cpp or even inline it.
I have no idea what "not really local" is meant to mean. On all other platforms stuff that lives on some server miles away is considered local, but UNC path on Windows are treated differently. IMHO, that makes no sense.
Assignee | ||
Comment 47•4 years ago
|
||
Why don't you just fix nsMsgIsLocalFile(), it's only used in nsMsgSend.cpp:
Yes, I considered removing these 3 lines at first https://searchfox.org/comm-central/source/mailnews/compose/src/nsMsgCompUtils.cpp#1315-1317. That is enough to fix the current bug. But I was not sure if it will break something else.
Comment 48•4 years ago
|
||
I'd be inclined to do that since IMHO the distinction makes no sense. Of course you change the behaviour, when not using CloudFile, on Windows you will attach the file instead of sending a link to the server. Is that correct? I thought the complaint is that files via UNC path don't get uploaded and are included instead. But what happens with small files via UNC now? Do they get attached or does a link to the server get sent?
So can you state the exact behaviour for small and big files via UNC path and then let us how that changes if the three lines were removed.
If you change behaviour, maybe people will get upset. In which case there could be an option: "treat UNC path as local".
Comment 49•4 years ago
|
||
I suppose the intention here may have been that small companies could send "attachments" with UNC links instead of actual attachments, for internal usage? Not sure if it worked as intended, but doesn't seem all that useful mixing up what is an attachment or not...
Comment 50•4 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #49)
I suppose the intention here may have been that small companies could send "attachments" with UNC links instead of actual attachments, for internal usage?
Right, but does this work? If it works, maybe we shouldn't change the behaviour.
Comment 51•4 years ago
|
||
OK, I tried it, small file via UNC path. That gets attached. So as far as I can tell, removing the three lines will fix the issue without negative side effects.
Comment 52•4 years ago
|
||
(In reply to Jorg K (CEST = GMT+2) from comment #50)
Right, but does this work? If it works, maybe we shouldn't change the behaviour.
Without checks that it's sending so someone internal it seems pretty bad. Say you have a company shared UNC disk where you keep up to date offers or something like this, then try to send it to the external customer...
Comment 53•4 years ago
|
||
Well, doesn't seem to work, bad idea, so remove it, right?
Comment 54•4 years ago
|
||
(In reply to Jorg K (CEST = GMT+2) from comment #48)
I thought the complaint is that files via UNC path don't get uploaded and are included instead.
No, that's not the problem. Actually the file is uploaded (and a link put into the message) and the file is additionally included in the mail.
Comment 55•4 years ago
|
||
Thanks for the clarification, I got a bit lost here. So it seems that trying to treat the UNC path especially only causes issues and might was well be removed.
Comment 56•4 years ago
|
||
(In reply to Jorg K (CEST = GMT+2) from comment #55)
Thanks for the clarification, I got a bit lost here. So it seems that trying to treat the UNC path especially only causes issues and might was well be removed.
I very strongly second this suggestion ;-)
Assignee | ||
Comment 57•4 years ago
|
||
Removed special handling of UNC file url on Windows.
Comment 58•4 years ago
|
||
Well, the entire function then becomes: return PL_strncasecmp(url, "file://", 7) == 0
. As I said before, you should inline that.
Assignee | ||
Comment 59•4 years ago
|
||
You're right, changed to use PL_strncasecmp
directly in nsMsgSend. Or do you mean turn it into an inline function? nsMsgSend.cpp will be rewrote in bug 1211292, so I think call PL_strncasecmp
is good for now.
Comment 60•4 years ago
|
||
Yes, this is what I meant.
Comment 61•4 years ago
|
||
Updated•4 years ago
|
Comment 62•4 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/1c14caeabdd5
Do not send network shared file as normal attachment when already uploded to filelink. r=mkmelin,jorgk
Comment 63•4 years ago
|
||
Is it possible to download a testbuild for Windows x86+x64?
Will this fix land in TB 68.9.X?
Assignee | ||
Comment 64•4 years ago
|
||
Is it possible to download a testbuild for Windows x86+x64?
You can download a nightly build later today from http://ftp.mozilla.org/pub/thunderbird/nightly/2020/06/. Look for 2020-06-30 at the bottom, 06-29 doesn't contain this patch.
Will this fix land in TB 68.9.X?
I guess unlikely.
Comment 65•4 years ago
|
||
Comment 66•4 years ago
|
||
(In reply to Ping Chen (:rnons) from comment #64)
Is it possible to download a testbuild for Windows x86+x64?
You can download a nightly build later today from http://ftp.mozilla.org/pub/thunderbird/nightly/2020/06/. Look for 2020-06-30 at the bottom, 06-29 doesn't contain this patch.
Will this fix land in TB 68.9.X?
I guess unlikely.
Thank you.
Comment 67•4 years ago
|
||
(In reply to Jorg K (CEST = GMT+2) from comment #65)
Comment on attachment 9160047 [details] [diff] [review]
793118.patchSimple patch, low risk, aligns behaviour on all platforms. Long-standing
annoying bug, should fix eventually.
Hello Jorg K,
I don't have the time and resources to compile TB for Windows (multiplatform) for every new security update coming up until ESR78 ist out.
The point is why to wait for ESR78? Some people are already waiting more than 8 years. This Bug has 3 Duplicates! Why?
And you already mentioned... "low risk".
My employer is using TB for over 300 users. This patch ist "critical" for us.
Comment 68•4 years ago
|
||
I don't understand the comment. I requested inclusion in TB 68.x, it's too late for TB 68.10 which is being built at time of writing.
Comment 69•4 years ago
|
||
(In reply to Jorg K (CEST = GMT+2) from comment #68)
I don't understand the comment. I requested inclusion in TB 68.x, it's too late for TB 68.10 which is being built at time of writing.
Sorry, I was confused by reading "Tracking/Tracking Flags > Milestone: Thunderbird 79.0"
Thank you... waiting excitedly for 68.10 then.
Comment 70•4 years ago
|
||
Uuupps, I meant 68.11.
Comment 71•4 years ago
|
||
Comment 72•4 years ago
|
||
bugherder uplift |
Thunderbird 78.0.1:
https://hg.mozilla.org/releases/comm-esr78/rev/2ef3d91d4867
Comment 73•4 years ago
|
||
Comment 74•4 years ago
|
||
Description
•