mozilla / web-ext

A command line tool to help build, run, and test web extensions
Mozilla Public License 2.0
2.63k stars 336 forks source link

web-ext run starts Firefox with many non-standard prefs set for no good reason #3176

Open Rob--W opened 3 weeks ago

Rob--W commented 3 weeks ago

web-ext sets many prefs that makes the browser not match reality. E.g. when I visit about:config, I noticed changes to security.fileuri.strict_origin_policy / security.fileuri.origin_policy, which results in an unrealistic same-origin policy for file:-URLs: for many years, the default is to have a strict policy, i.e. every file:-URL is cross-origin relative other file:-URLs, but the different default results in a weaker policy where local files can read from each other.

This pref is set at:

https://github.com/saadtazi/firefox-profile-js/blob/41ec759b24d71e5768ca114c8fef62bbe205cf3b/lib/firefox_profile.js#L50-L51

... there are many other prefs there, many of them obsolete (and not doing anything), others with questionable results. We should minimize the number of preferences, and make sure that if there are any, that we set them along with a comment in web-ext, at https://github.com/mozilla/web-ext/blob/a81ddc1c4fb09152ee4efd059643a2312d16e966/src/firefox/preferences.js