FileLink not inserting links when filename includes Unicode characters
Categories
(Thunderbird :: FileLink, defect)
Tracking
(thunderbird_esr102? fixed)
People
(Reporter: tdulcet, Assigned: TbSync)
References
(Blocks 1 open bug)
Details
(Keywords: regression)
Attachments
(3 files)
32.68 KB,
image/png
|
Details | |
17.28 KB,
image/png
|
Details | |
Bug 1789589 - Convert cloudFileUpload to binary string before using btoa(). r=#thunderbird-reviewers
48 bytes,
text/x-phabricator-request
|
wsmwk
:
approval-comm-esr102+
|
Details | Review |
This bug was first reported to me in a review of my "FileLink provider for Send" add-on. That review was obviously meant for Geoff's "FileLink provider for Dropbox" add-on, but this issue is a Thunderbird regression, so it affects all FileLink add-ons.
The person in the review said they were unable to link files when the filename contains "Polish characters such as ż ą ę". I am able to confirm this regression with both the latest Thunderbird Beta and Daily. It works fine with Thunderbird 91. My add-on successfully uploads the file and returns the link to TB, but it is never added to the e-mail. Instead, I get the attached popup with a rather unhelpful error message and this potentially related error in the error console:
TypeError: PrecompiledScript.executeInGlobal: Argument 1 is not an object. ExtensionContent.jsm:580:25
This may be related to Bug 1786758.
Reporter | ||
Updated•5 months ago
|
Comment 1•5 months ago
|
||
Perhaps from bug 1669829.
Good day!
I have same error in portable version with big size file (i think more than 5 or 10mb). Small file (less 5mb) is work well!
It's uploading but link not insert into message body and error like image in report.
I try it with any FileLink providers.
ps. sorry for my english =)
Reporter | ||
Comment 3•5 months ago
|
||
(In reply to Ping Chen (:rnons) from comment #1)
Perhaps from bug 1669829.
Bug 1643729 and Bug 1670791 also included some significant FileLink changes.
I attached a screenshot of the only console error I see in the latest Thunderbird Daily 106 after attempting to link a file with Unicode characters in the filename.
(In reply to Alexander from comment #2)
I have same error in portable version with big size file (i think more than 5 or 10mb). Small file (less 5mb) is work well!
I am not seeing this, as neither small (less than 5 MB) nor bigger files (greater than 25 MB) work for me when the filename includes Unicode characters. Files with all ASCII characters in the filename seem to work as expected regardless of size.
Assignee | ||
Updated•5 months ago
|
Assignee | ||
Comment 4•5 months ago
|
||
Assignee | ||
Updated•5 months ago
|
Updated•5 months ago
|
Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/62defccbffff
Convert cloudFileUpload to binary string before using btoa(). r=aleca
Drive-by comment:
https://hg.mozilla.org/comm-central/rev/62defccbffff#l1.18 let binaryString = String.fromCharCode(...utf8Bytes);
Note: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax
Quote: When using spread syntax for function calls, be aware of the possibility of exceeding the JavaScript engine's argument length limit.
Typical use is:
https://searchfox.org/comm-central/search?q=String.fromCharCode.apply%28&path=&case=false®exp=false
Or maybe it's always short enough, like in this usage:
https://searchfox.org/comm-central/search?q=String.fromCharCode.*%5C.%5C.%5C.&path=&case=false®exp=true
Comment 8•5 months ago
|
||
I think apply
has the same problem of argument length limit. There is MailStringUtils.jsm.
Reporter | ||
Comment 9•4 months ago
|
||
It has now been a few weeks since this regression fix was pushed to TB Daily, so can it please be uplifted to TB 102? It is of course a rather serious regression that breaks all FileLink add-ons for many international users.
Assignee | ||
Comment 10•4 months ago
•
|
||
Comment on attachment 9293910 [details]
Bug 1789589 - Convert cloudFileUpload to binary string before using btoa(). r=#thunderbird-reviewers
[Approval Request Comment]
Regression caused by (bug #):
User impact if declined: Filelink entries are not added to the email, if their filenames include unicode chars.
Testing completed (on c-c, etc.): On BETA for 1 month.
Risk to taking this patch (and alternatives if risky): Simple patch, should be fine.
Comment 11•4 months ago
|
||
Comment on attachment 9293910 [details]
Bug 1789589 - Convert cloudFileUpload to binary string before using btoa(). r=#thunderbird-reviewers
[Triage Comment]
Approved for esr102
Comment 12•4 months ago
|
||
bugherderuplift |
Thunderbird 102.4.0:
https://hg.mozilla.org/releases/comm-esr102/rev/3edbd1b751fb
Description
•