Closed Bug 636147 Opened 13 years ago Closed 13 years ago

Chrome privileges in the content scripts

Categories

(Add-on SDK Graveyard :: General, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 601295

People

(Reporter: irakli, Assigned: irakli)

References

Details

(Whiteboard: [sg:moderate] could lead to sg:critical mistakes in jetpacks)

Attachments

(1 file, 1 obsolete file)

At the moment all the content scripts do have an access to the `Components` object and there for to all the XPCOM capabilities due to the misbehavior of frameworks like jQuery if they are loaded in a sandbox with a non chrome privileges. This bug will help us not have that in mind.

Also I think that `new Cu.Sandbox(this._port.window)` may make a trick.
Still needed and important!
It make some jquery unit tests fails on bug 616946.
Comment for bug triage: I think it's important to have this fixed for 1.0 as users may start using chrome privileges from content scripts which is not only insecure but they will also break once this is fixed.
OS: Mac OS X → All
Priority: -- → P1
Hardware: x86 → All
Target Milestone: --- → 1.0b5
Assignee: nobody → rFobic
Adding dependency on 601295 as Alex made some fixes that partially resolves this issue.
Comment on attachment 526736 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/147#

This pull request is still work in progress as not all of the jQuery test pass.
Attachment #526736 - Attachment is obsolete: true
Target Milestone: 1.0b5 → 1.0
Flagging as a security bug. This seems to be counter to the goals of JetPacks. Could lead to review mistakes if add-on reviewers assume page-mods are relatively safe because they're "sandboxed". Likely to leak privileged objects into page content if the page-mod script creates objects to enhance the page -- wrappers and compartments might help, but history says those can be bypassable.
Whiteboard: [sg:moderate] could lead to sg:critical mistakes in jetpacks
Marking this as a duplicate of 601295.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: