Closed
Bug 1385306
Opened 9 years ago
Closed 8 years ago
Make Activity Stream unprivileged: ensure about:newtab document runs with null principal
Categories
(Firefox :: New Tab Page, enhancement, P1)
Firefox
New Tab Page
Tracking
()
RESOLVED
WONTFIX
Iteration:
60.3 - Feb 26
People
(Reporter: ursula, Assigned: ursula)
References
(Blocks 1 open bug)
Details
(Whiteboard: [security])
Attachments
(1 file)
After giving Activity Stream URI_SAFE_FOR_UNSTRUSTED_CONTENT in Bug 1021667, to make Activity Stream fully unprivileged we need to set the principal to be null.
| Assignee | ||
Comment 1•9 years ago
|
||
Christoph, perhaps you could shed some light on the best/easiest way to do this?
Flags: needinfo?(ckerschb)
Updated•9 years ago
|
Comment 2•9 years ago
|
||
(In reply to Ursula Sarracini (:ursula) from comment #1)
> Christoph, perhaps you could shed some light on the best/easiest way to do
> this?
I can help with that. First question: do you want to set it to null or to a NullPrincipal? Where do you want that principal? And what principal - The load/triggering/principalToInherit in the loadInfo?
Flags: needinfo?(ckerschb)
Updated•9 years ago
|
Updated•8 years ago
|
Comment 3•8 years ago
|
||
What's the current state of this bug? Do we still intend to do this "soon"?
Flags: needinfo?(usarracini)
| Assignee | ||
Comment 4•8 years ago
|
||
It got de-prioritized recently because we were focusing on some critical things for 57, but yes we still plan on doing this. I think we may actually need this in order for bug 1184701 to work, and the work for bug 1184701 was intended to start soon, so we should start the work on this soon as well.
Flags: needinfo?(usarracini)
Updated•8 years ago
|
Updated•8 years ago
|
Whiteboard: [security]
| Assignee | ||
Updated•8 years ago
|
| Assignee | ||
Updated•8 years ago
|
Iteration: --- → 60.3 - Feb 26
| Comment hidden (mozreview-request) |
Comment 6•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8950621 [details]
Bug 1385306 - Make Activity Stream unprivileged: ensure about:newtab document runs with null principal
https://reviewboard.mozilla.org/r/219896/#review225736
Great, r=me.
It might be worth having a followup bug and discussing with Christoph Kerschbaumer if we can add a CSP to about:newtab/about:home-with-activity-stream and use them to constrain attack vectors further.
Attachment #8950621 -
Flags: review?(gijskruitbosch+bugs) → review+
Comment 7•8 years ago
|
||
(In reply to :Gijs from comment #6)
> It might be worth having a followup bug and discussing with Christoph
> Kerschbaumer if we can add a CSP to
> about:newtab/about:home-with-activity-stream and use them to constrain
> attack vectors further.
Yes, that would be great. Happy to help find the right CSP. You can take a look at Bug 1436808 where we started to add a CSP to content privileged about pages.
| Assignee | ||
Comment 8•8 years ago
|
||
So after pushing the original patch to try, there were some failures: https://treeherder.mozilla.org/#/jobs?repo=try&revision=757ea71cf9f7b4114261ec0fd8a09303b4bca5fc&group_state=expanded, mainly about not hiding the url in the url bar when the principal was null.
I thought that was bizarre but then I saw this: https://dxr.mozilla.org/mozilla-central/rev/6d8f470b2579e7570f14e3db557264dc075dd654/browser/base/content/browser.js#6965 which we use to help determine (based on the browser's content principal) if we should set the urlbar value to "" later one: https://dxr.mozilla.org/mozilla-central/rev/6d8f470b2579e7570f14e3db557264dc075dd654/browser/base/content/browser.js#2712.
There's already some special casing going on for about:blank having a null principal, so adding some special casing for about:newtab/about:home there too did the trick.
I checked and there aren't any about: pages that need url bar hiding and *also* have null principal aside from these 3 so I'm thinking special case is fine. Gijs, what do you think?
Flags: needinfo?(gijskruitbosch+bugs)
Comment 9•8 years ago
|
||
(In reply to Ursula Sarracini (:ursula) from comment #8)
> I checked and there aren't any about: pages that need url bar hiding and
> *also* have null principal aside from these 3 so I'm thinking special case
> is fine. Gijs, what do you think?
Yep, just adding a special case for about:newtab having the null principal here is fine. Happy to review a patch to do that in more detail if that's helpful.
Flags: needinfo?(gijskruitbosch+bugs)
| Assignee | ||
Comment 10•8 years ago
|
||
After lots of back and forth with Gijs and ckerschb, we decided this will be a WONTFIX. As it turns out we can't access indexedDB on documents with a null principal, and as a result snippets won't work on newtab/home if we drop their principals to null. So we're going to leave their principals to codebase but we should really get review on our CSP and figure out if it'll break snippets/onboarding and sort that out so we can at least add the CSP (right now it's on report-only).
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Updated•7 years ago
|
Component: Activity Streams: Newtab → New Tab Page
You need to log in
before you can comment on or make changes to this bug.
Description
•