The messages query fails with "aFolder is null" for folders whose paths contain parentheses
Categories
(Thunderbird :: Add-Ons: Extensions API, defect)
Tracking
(thunderbird_esr6871+ fixed, thunderbird71 fixed, thunderbird72 fixed)
People
(Reporter: mihaicodrean, Assigned: darktrojan)
References
Details
Attachments
(1 file)
(deleted),
patch
|
mkmelin
:
review+
jorgk-bmo
:
approval-comm-beta+
jorgk-bmo
:
approval-comm-esr68+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0
Steps to reproduce:
Used the WebExtensions "messages.query" API on a folder whose path contains parentheses, e.g. "My Folder (2)".
Actual results:
aFolder is null datastore.js:2214
_mapFolder resource:///modules/gloda/datastore.js:2214
toParamAndValue resource:///modules/gloda/gloda.js:1329
_convertToDBValuesAndGroupByAttributeID resource:///modules/gloda/datastore.js:3469
next self-hosted:1105
queryFromQuery resource:///modules/gloda/datastore.js:3689
getCollection resource:///modules/gloda/query.js:115
collectionArray chrome://messenger/content/parent/ext-messages.js:194
query chrome://messenger/content/parent/ext-messages.js:193
query self-hosted:869
result resource://gre/modules/ExtensionParent.jsm:1114
withPendingBrowser resource://gre/modules/ExtensionParent.jsm:725
result resource://gre/modules/ExtensionParent.jsm:1114
callAndLog resource://gre/modules/ExtensionParent.jsm:1073
call resource://gre/modules/ExtensionParent.jsm:1113
AsyncFunctionNext self-hosted:689
Expected results:
The search should have worked, just as it does with other folders, like "My Folder".
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
This is basically bug 1588391 all over again. The folder's URI has encoded brackets, decodeURIComponent
decodes the brackets, but encodeURIComponent
doesn't encode them, because it isn't RFC 3986 compliant (according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent anyway).
Assignee | ||
Comment 2•5 years ago
|
||
Comment 3•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/46a75a66d88d
In WebExtensions folder lookup, encode characters !'()* which aren't handled by encodeURIComponent. r=mkmelin
Updated•5 years ago
|
Updated•5 years ago
|
Comment 6•5 years ago
|
||
TB 71 beta 3:
https://hg.mozilla.org/releases/comm-beta/rev/7b4e0757efc6667b5f570909efee795615cf7848
Updated•5 years ago
|
Comment 7•5 years ago
|
||
TB 68.3 ESR:
https://hg.mozilla.org/releases/comm-esr68/rev/394739fc3a198c7b49afcc568dbdae056885a594
Description
•