Closed
Bug 1370417
Opened 8 years ago
Closed 5 years ago
es module bug with file:///
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: capocyril, Unassigned)
Details
(Keywords: triage-deferred)
Attachments
(1 file)
1.01 KB,
application/x-zip-compressed
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170529025115
Steps to reproduce:
When using modules, with an html file, served directly from disk with file:///
import statement that use relative path with a sub-folder like import {helperMethod} from '../1.js'; do not work
Note it works perfectly fine when the file is in the same folder: e.g import {helperMethod} from './1.js';
Going to attach file subfolderbugrepro.zip to reproduce
Actual results:
What is strange, is that there is no Error displayed at all in the console.
Expected results:
import works or at least error
Updated•8 years ago
|
Keywords: triage-deferred
Priority: -- → P3
Comment 1•6 years ago
|
||
Now I can see a warning message:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///C:/Users/sasch/Desktop/test/1.js. (Reason: CORS request not http).
The behavior difference when in the same folder still exists.
Comment 2•5 years ago
|
||
Now all import fails by default with file:///
to make sure any malicious HTML file can't access arbitrary files in the same directory. Turning off privacy.file_unique_origin
restores the previous behavior.
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•