Firefox 68 fixes a security problem with local files (https://www.mozilla.org/en-US/security/advisories/mfsa2019-21/#CVE-2019-11730), but in so doing breaks testing code locally. Is there a way to override this as can be done with Chrome and Opera (e.g., --allow-file-access-from-files)?
I cannot find anything relevant on the Firefox site, and cannot find a suitable command-line option or anything in about:config.
try {
main = opener.document;
}
catch (e) {
console.log(e);
console.log(e.name);
}
}
I get the following messages in the console:
DOMException: "Permission denied to access property "document" on cross-origin object"
SecurityError
"In Firefox, the preference that disables CORS is content. cors. disable. Setting this to true disables CORS, so whenever that's the case, CORS requests will always fail with this error." developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/…
This often occurs if the URL specifies a local file, using the file:/// scheme. To fix this problem, make sure you use HTTPS URLs when issuing requests involving CORS, such as XMLHttpRequest , Fetch APIs, Web Fonts ( @font-face ), and WebGL textures, and XSL stylesheets.
Opening about:configType about:config in the address bar and press Enter. A warning page may appear. Click Accept the Risk and Continue to go to the about:config page. Click Show All to view all preferences currently set in the profile or use the Search preference name box to filter the list.
In my case: Firefox ver. 98.0.2 (64-bit) going to about:config
and changing the flag helped:
security.fileuri.strict_origin_policy
= false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With