4 ms·
Sandboxing user side javascript from the web seems like a reasonable security step. Sandboxing web side javascript from the user side javascript is removes powe
by brudgers 9y ago
Sandboxing user side javascript from the web seems like a reasonable security step. Sandboxing web side javascript from the user side javascript is removes power from users in the way that concerned Stallman 35 years ago.
Unfortunately, that's the direction Mozilla is going with web extensions. It must because Mozilla's complicity to bake DRM into the browser requires giving control of the user's computer over to media interests. It requires favoring corporate interests over user freedom.
The horrible thing about Quantum is it replaces the last browser that put power in the hands of users. It removes the last browser that was not constrained explicitly for media consumption.
- pcwalton 9y agoWeb Extensions have nothing to do with DRM.
- brudgers 9y agoThe sandbox model limits the ability of the user to interact with the contents loaded into the browser from a remote source. This is required for a robust implementation of DRM and a robust implementation of DRM is a goal for Mozilla. The sandbox model necessary for DRM is what limits the power of web extensions. DRM priority is why the sandbox model cannot be turned off by the user. Making Netflix in Chrome low risk for Netflix is why the user is no longer allowed to control their browser. The sales pitch for Quantum is that it is faster for media consumption. The developer pitch is that it is easier to write extensions for consuming content.
- pcwalton 9y agoThis is nonsense, sorry. The Web Extensions API is designed (1) to prevent add-ons from breaking as the Firefox browser changes; (2) to allow constraining the behavior of add-ons to limit their ability to compromise the security model of the browser. The API is not intended to prevent you from changing the software you're running on your own system. If it were, you'd see pervasive obfuscation like PatchGuard, not sandboxed EME plugins with clearly defined interfaces.
- brudgers 9y agoThe security model of the browser includes robust support for DRM. Quantum broke add-ons. Their funcationality is not reproducible, e.g. reading and writing ordinary files on the file system, interacting with the javscript running on a webpage, providing an arbitrary keymapping, etc. Quantum reflects a decision to remove user controlled functionality in support of general purpose computing and turn Firefox into a media consumption appliance controlled by Mozilla and fungible with Chrome.
- pcwalton 9y agoIt's completely legitimate to be unhappy with, and to disagree with, the decision to drop support for XUL add-ons. What I don't appreciate is the incorrect assumption that I, along with everyone else who supported this decision, did so in order to enhance DRM. I supported this decision because the XUL add-on "API" did not cleanly separate interface from implementation, and as a result major upgrades to the Firefox front-end and engine were becoming very difficult to undertake.
- brudgers 9y agoWhether or not everyone did it in order to enhance DRM, it is still the case that that is one of the end results. Another is that Firefox no longer supports general purpose computing. https://www.youtube.com/watch?v=HUEvRyemKSg https://www.youtube.com/watch?v=HUEvRyemKSg
- pcwalton 9y ago> Whether or not everyone did it in order to enhance DRM, it is still the case that that is one of the end results. Virtually nobody who works in DRM would agree that the add-ons model has anything to do with the effectiveness of DRM. If you have access to the user account running Firefox, running arbitrary unsigned native code in the Firefox process is trivial. > Another is that Firefox no longer supports general purpose computing. XUL add-ons were JavaScript. Web Extensions are JavaScript. You can write whatever Web Extension you want for whatever purpose you want.
- AgentME 9y agoHow is web side javascript being sandboxed from extensions? Extensions can inject javascript into web pages. (Assuming it works like Chrome, then sure the code runs in a separate isolated world by default, but you can inject code to run in the web page's own context by appending a script element to the page.)
- brudgers 9y agoThe content provider gets to define the entire javascript context before any code can be injected. The content providers code can monitor the DOM and prevent other code from changing it. It can effectively whitelist/blacklist URL's. It can redefine everything from object.prototype on down. The logical structure is that user side code can only do what the content provider does not prevent. content scripts have some limitations. They cannot: + Use chrome.* APIs, with the exception of: extension ( getURL , inIncognitoContext , lastError , onRequest , sendRequest ) i18n runtime ( connect , getManifest , getURL , id , onConnect , onMessage , sendMessage ) storage + Use variables or functions defined by their extension's pages + Use variables or functions defined by web pages or by other content scripts https://developer.chrome.com/extensions/content_scripts https://developer.chrome.com/extensions/content_scripts
- AgentME 9y agoDoesn't setting "run_at":"document_start" allow the content script to run before any of the page's scripts? All of those ways that you mentioned that a web-page could booby-trap its javascript context could be done by an extension first. >+ Use variables or functions defined by their extension's pages >+ Use variables or functions defined by web pages or by other content scripts Those are just consequences of the content script not running in the same javascript context. If it ran in the same context, then the web page javascript could access private extension APIs or otherwise break content script code. If you actually want to interact with the page's variables, there's ways to do that.
- amaranth 9y agoNothing to do with DRM, the old model let extensions modify every part of the browser that could be touched via JavaScript (and since the browser UI itself is made with XUL and JS that's quite a lot of it) and even allowed using C++ to access all of the compiled guts as well. That is impossible to support sanely (every change is a breaking change to something) and is a security nightmare as well (users have no idea what an extension can do unless they read the code, if it's even available). The new model is sandboxed JavaScript that gains all potentially unsafe functionality via somewhat fine-grained permissions which means you have a good idea what an extension is capable of and know it can't do anything unexpected like grabbing random files on your disk. The downside to this model is someone actually has to think about what an API should look like and what the security implications are and then do the work to implement it. Before if someone made an API great but if not you could just do it yourself.
- brudgers 9y agoXUL could have been replaced without implementing Chrome's restrictions on the user. They are orthogonal.
- pcwalton 9y agoThey aren't restrictions on users. They're restrictions on add-ons. And the Firefox extension model does not implement Chrome's restrictions. It has APIs that Chrome does not support: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Br...
- brudgers 9y agoWeb extensions express the architectural decision to remove power from the user. The extra API's are better for the user in the sense that a sharper knife is better for the user when their hands are cut off.