Closed Bug 1391669 Opened 6 years ago Closed 6 years ago
FR: Different permissions for background and content scripts
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 Build ID: 20170612122443 Steps to reproduce: For my WebExtension, I want the <all_urls> permission for my background script. I want it to then tabs.executeScript() a content script which does _not_ have the <all_urls> permission. This is the one case I know of for sure; I probably have a few similar things I'd like to do like this. In general I want runtime-generated content scripts to not have privileges that "my extension" does.
I think this could also be achieved with bug 1353468. Since the content script instantiating the sandbox would have the same privileges as the background script but the sandbox would not.
Component: Untriaged → WebExtensions: General
Product: Firefox → Toolkit
Yes, if I could construct/control a sandbox as per bug 1353468 I'd actually have exactly what I want. Then for my needs I'd consider this bug obsolete.
Hi Anthony, this has been added to the agenda for the September 5 WebExtensions APIs triage meeting. Would you be able to join us? Wiki: https://wiki.mozilla.org/Add-ons/Contribute/Triage#Next_Meeting Agenda: https://docs.google.com/document/d/13gmYyN0qCjzV7YAsqGpbeeHr3al0yiWP7ayqKJPLS2w/edit#
Sorry for slow response, yes I should be able to make it.
I believe this is being replaced by the user script support in bug 1332273, although there might be more bugs. Based on what we talked about in the design-decision meeting, I think this one is not going anywhere awaiting the outcome of that bug. Closing for now.
Severity: normal → enhancement
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Priority: -- → P5
Resolution: --- → DUPLICATE
Whiteboard: [design-decision-needed] → [design-decision-denied]
This one should be orthogonal to 1332273 since it is about permissions available to the content script, such as the XHRs being more powerful than the page content's. userscript extension requires <all_urls> permission -> content scripts have cross-domain XHR -> user scripts inherit that. Additionally they also inherit access to the content script APIs such as storage, which could also pose a security issue. Although personally I believe that problem is better solved with bug 1353468 since that one also solves all those problems, including shared globals and shared xray wrappers.
You need to log in before you can comment on or make changes to this bug.