Services.scriptloader.loadSubScript() fails to load with Error if the file name begins with a non-Latin character.
Categories
(Core :: XPConnect, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr140 | --- | unaffected |
| firefox-esr153 | --- | unaffected |
| firefox153 | --- | unaffected |
| firefox154 | --- | unaffected |
| firefox155 | --- | affected |
People
(Reporter: alice0775, Unassigned)
Details
(Keywords: intl, nightly-community)
Steps to reproduce:
Create a file "あscript.uc.js" in the chrome://userchrome/content/ folder which is specified with chrome.manifest.
Try to load the script using Services.scriptloader.loadSubScript method.
Actual results:
Error opening input stream (invalid filename?): chrome://userchrome/content/%E3%81%82script.uc.js
Interestingly, if a non-Latin character appears anywhere other than the beginning of the filename (i.e., "sあcript.uc.js"), the program runs without any problems.
And in the case of file: protocol (although security.allow_unsafe_subscript_loads must be set to true for the nightly build), both work.
Expected results:
Since these are all valid filenames, they should load correctly.
Comment 1•2 days ago
|
||
:tschuster, since you are the author of the regressor, bug 1974213, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Comment 2•2 days ago
•
|
||
Is this really a regression from that change? Because that really didn't change how we parse URLs. And I would have expected the error to be Trying to load untrusted URI instead. What happens when you set the preference security.allow_unsafe_subscript_loads to true?
| Reporter | ||
Comment 3•2 days ago
|
||
(In reply to Tom Schuster from comment #2)
Is this really a regression from that change? Because that really didn't change how we parse URLs. And I would have expected the error to be
Trying to load untrusted URIinstead. What happens when you set the preferencesecurity.allow_unsafe_subscript_loadstotrue?
The issue is reproduced even if set security.allow_unsafe_subscript_loads = true.
And also on Firefox91...
In other words, this problem has existed for some time.
Comment 4•2 days ago
•
|
||
Thank you for checking!
Updated•2 days ago
|
| Reporter | ||
Updated•1 day ago
|
| Reporter | ||
Updated•1 day ago
|
Description
•