Closed
Bug 797909
Opened 12 years ago
Closed 12 years ago
Docshell sandbox flags should apply to initial about:blank
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: public, Assigned: smaug)
Details
Attachments
(2 files)
567 bytes,
text/html
|
Details | |
3.61 KB,
patch
|
bzbarsky
:
review+
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
There are two use-cases where people might want to access/modify the sandbox attribute of an iframe before inserting it into the document: - when trying to detect if the browser supports that feature (as feature-detection scripts are usually in the <head> of the document and the body isn't accessible) - when trying to create an iframe that is sandboxed from start In Firefox, the sandbox attribute cannot be accessed or modified before the iframe is inserted into the document.
Reporter | ||
Comment 2•12 years ago
|
||
Writing the test-case made me realize
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Summary: Sandbox attribute not accessible/modifiable before the iframe is inserted into the document → Sandbox attribute not modifiable before the iframe is inserted into the document
Reporter | ||
Comment 3•12 years ago
|
||
Oops, I inadvertently submitted the last comment by pressing "Enter" while editing the title, sorry about that. Writing the test-case made me realize that accessing the attribute was actually possible (I'm pretty sure it wasn't possible a few days ago but anyway), but modifying it isn't. Opening the attached test case in Firefox will display a text that has been inserted into the a sandboxed iframe, while opening the same test case in Chrome won't display any text but will cause sandbox access violation errors. In practice this doesn't cause any security problem, it just made me think that it was possible to access the sandboxed iframe content from the parent document when the iframe wasn't sandboxed at all.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: INVALID → ---
Reporter | ||
Comment 4•12 years ago
|
||
Comment 5•12 years ago
|
||
So the issue is that we're allowing access to the sandboxed iframe, which should be using a nullprincipal, right? That seems to be because we don't sandbox the initial about:blank? We should. There were comments about this in bug 341604 that (incorrectly, it seems) concluded there wasn't a problem here. Requesting tracking, since this seems like a bad bug to ship...
tracking-firefox17:
--- → ?
Summary: Sandbox attribute not modifiable before the iframe is inserted into the document → Docshell sandbox flags should apply to initial about:blank
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → bugs
Assignee | ||
Comment 7•12 years ago
|
||
Hmm, we do set the sandbox flags to initial about:blank. Why is that not working
Assignee | ||
Comment 8•12 years ago
|
||
Ah, principal
Assignee | ||
Comment 9•12 years ago
|
||
Attachment #668200 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 10•12 years ago
|
||
Still trying to push to try. It is very very slow atm.
Comment 11•12 years ago
|
||
Comment on attachment 668200 [details] [diff] [review] patch r=me
Attachment #668200 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 12•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/fd724f194a1f
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Comment 13•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #6) > jst, do you know when imelven gets back? I'm told he's back on the 15th.
Comment 14•12 years ago
|
||
Tracking based on comment 5, also updating status and milestone for 18 to help with proper triage searching. Please nominate for uplift - if this doesn't get in before Monday October 8th on Aurora it will need to be nominated for beta.
Assignee | ||
Comment 15•12 years ago
|
||
Comment on attachment 668200 [details] [diff] [review] patch [Approval Request Comment] Bug caused by (feature/regressing bug #): Bug 341604 User impact if declined: sandbox doesn't work the way it should Testing completed (on m-c, etc.): landed to m-c Risk to taking this patch (and alternatives if risky): should be low risk String or UUID changes made by this patch: NA
Attachment #668200 -
Flags: approval-mozilla-aurora?
Comment 16•12 years ago
|
||
Comment on attachment 668200 [details] [diff] [review] patch thanks - please land before Monday Oct 8th merge day.
Attachment #668200 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 17•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/ff90431f32c3
Comment 18•12 years ago
|
||
Sorry about this, thanks for handling it Olli !
You need to log in
before you can comment on or make changes to this bug.
Description
•