Bug: Cannot open attachment when its filename contains an illegal characters e.g. ":", slash
Status: RESOLVED
Priority: --
Resolution: FIXED
Created: 2021-12-30 08:28:36+00:00
Resolved: 2022-02-04 19:57:36+00:00

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0

Steps to reproduce:

I use: TB 91.4.1 x64 (pl-PL), Win 8.1 Pro x64 / Win 10 x64 (21H1) - bug is on many different machines - at the same time (after automatically upgrade existing installation to 91.4.1)
My accounts use: POP3

When i receive an new mail with attached PDF files witch contains an illegal (in filenames) character - i have ":", i cannot open this by clicking on its filename (the down left corner of the window) when its assigned to external PDF Reader (i use Acrobat Reader DC), when its assigned to open internally to Thunderbird, then it open fine.



Actual results:

When i click to open attachment with illegal chars nothing is happens (when PDF file is attached to external program), when attached PDF is assigned and opened internally in Thunderbird is opened fine.

This is observed in TB 91.4.1, the TB 68.12.1 and 78.14.0 i think is not affected - the same messages (*.eml file) are working fine until now, when TB is upgraded to 91.x - no user reports about this until yesterday (massive TB upgrade to 91.4.1 - resolved bug with S/MIME and forward PDF attachment)

TB 68.12.1 / 78.14.0 and 91.3.2 - removes illegal chars before open directly attached files, but 91.4.1 is not

example of failure filename: " Numer polisy: 1234567878901 _ Numer EH: 032123456789 _ Nazwa Klienta: COMPANY NAME LLC _ Kod decyzji: XY _ Numer IDS: 12345678901 .pdf" - SPACE character is on the first place - this is not a copy/paste mistake :)

In the error console we can see 2 bugs:

[Exception... "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIXPCComponents_Utils.readUTF8URI]"  nsresult: "0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)"  location: "JS frame :: resource://gre/modules/L10nRegistry.jsm :: L10nRegistry.loadSync :: line 692"  data: no] L10nRegistry.jsm:692:19
    loadSync resource://gre/modules/L10nRegistry.jsm:692
    fetchFile resource://gre/modules/L10nRegistry.jsm:607
    generateResourceSetSync resource://gre/modules/L10nRegistry.jsm:512
    map self-hosted:221
    generateResourceSetSync resource://gre/modules/L10nRegistry.jsm:507
    generateResourceSetsForLocaleSync resource://gre/modules/L10nRegistry.jsm:449
    next self-hosted:1430
    generateBundlesSync resource://gre/modules/L10nRegistry.jsm:186
    next self-hosted:1430
    touchNext resource://gre/modules/Localization.jsm:167
    generateBundles resource://gre/modules/Localization.jsm:473
    <anonimowa> resource:///modules/OTRUI.jsm:16
    get resource://gre/modules/XPCOMUtils.jsm:62
    _str resource:///modules/OTRUI.jsm:20
    initStrings resource:///modules/OTRUI.jsm:38
    init resource:///modules/OTRUI.jsm:259
    InterpretGeneratorResume self-hosted:1482
    AsyncFunctionNext self-hosted:692

***

Uncaught (in promise) 
Exception { name: "", message: "Component returned failure code: 0x8071007b [nsIFile.createUnique]", result: 2154889339, filename: "chrome://messenger/content/msgHdrView.js", lineNumber: 2017, columnNumber: 0, data: null, stack: "saveAndOpen@chrome://messenger/content/msgHdrView.js:2017:18\nopen@chrome://messenger/content/msgHdrView.js:2052:19\n", location: XPCWrappedNative_NoHelper }
​
columnNumber: 0
​
data: null
​
filename: "chrome://messenger/content/msgHdrView.js"
​
lineNumber: 2017
​
location: XPCWrappedNative_NoHelper { QueryInterface: QueryInterface(), filename: Getter, name: Getter, … }
​
message: "Component returned failure code: 0x8071007b [nsIFile.createUnique]"
​
name: ""
​
result: 2154889339
​
stack: "saveAndOpen@chrome://messenger/content/msgHdrView.js:2017:18\nopen@chrome://messenger/content/msgHdrView.js:2052:19\n"
​
<prototype>: ExceptionPrototype { toString: toString(), name: Getter, message: Getter, … }




Expected results:

TB should open attached PDF in external programs as usually in previous version of TB like 68.x and 78.x and older 91.x versions