Closed
Bug 797657
Opened 12 years ago
Closed 12 years ago
Change default CSP to desired policy for certified apps
Categories
(Core :: General, defect, P2)
Core
General
Tracking
()
People
(Reporter: sicking, Assigned: ochameau)
References
Details
(Whiteboard: [qa-])
Attachments
(1 file)
1.38 KB,
patch
|
sicking
:
review+
|
Details | Diff | Splinter Review |
Right now we had to adjust the policy to allow inline scripts and stylesheets since otherwise some apps broke. We should flip it back and find all cases which gives warnings and fix those.
Updated•12 years ago
|
Priority: -- → P2
Updated•12 years ago
|
Blocks: privileged-apps
Comment 1•12 years ago
|
||
Why don't they use 'unsafe-inline' (or obsolete 'inline-script')?
Why don't we require to use CSP properly to certify them?
Privileged or certified apps should be more secure than normal web apps.
I believe it's better to help app developers, not loose security of our OS.
Reporter | ||
Comment 2•12 years ago
|
||
That's exactly why we have this bug filed.
Comment 3•12 years ago
|
||
I set the CSP prefs manually in system/b2g/defaults/pref/user.js and everything seems to still work. Would be nice if someone else wants to verify, but then I say we flip the switch. I used:
pref("security.apps.certified.CSP.default", "default-src *; script-src 'self'; object-src 'none'; style-src 'self'");
Comment 4•12 years ago
|
||
Milestoning for C2 (deadline of 12/10), as this meets the criteria of "known P2 bugs found before or during C1".
Target Milestone: --- → B2G C2 (20nov-10dec)
Updated•12 years ago
|
Assignee: nobody → poirot.alex
Assignee | ||
Comment 5•12 years ago
|
||
Assignee | ||
Comment 6•12 years ago
|
||
Comment on attachment 682108 [details] [diff] [review]
Bug 797657: Change default CSP to desired policy for certified apps
See bug 796739 comment 30 for a description about existing CSP violation still alive in gaia. We would like to wait for bug 796739 to be closed before landing this patch.
Attachment #682108 -
Flags: review?(jonas)
Reporter | ||
Comment 7•12 years ago
|
||
Comment on attachment 682108 [details] [diff] [review]
Bug 797657: Change default CSP to desired policy for certified apps
Review of attachment 682108 [details] [diff] [review]:
-----------------------------------------------------------------
Assuming that you've done a lot of testing to make sure that this doesn't break anything, r=me
Attachment #682108 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 9•12 years ago
|
||
Still need attachment 682083 [details] from bug 796739.
I'll try to get it reviewed'n landed tomorrow.
Flags: needinfo?(poirot.alex)
Assignee | ||
Comment 10•12 years ago
|
||
We are now ready to flip to safe default, only UITest app is going to be broken.
But it is only used for manual testing and will hopefully be fixed easily thanks to bug 801783.
But I had a relevant comment from James, why is document.write allowed ?
It doesn't seem to be blocked by CSP.
Keywords: checkin-needed
Comment 11•12 years ago
|
||
(In reply to Alexandre Poirot (:ochameau) from comment #10)
> We are now ready to flip to safe default, only UITest app is going to be
> broken.
> But it is only used for manual testing and will hopefully be fixed easily
> thanks to bug 801783.
>
> But I had a relevant comment from James, why is document.write allowed ?
> It doesn't seem to be blocked by CSP.
I discussed this with Sid, our understanding is that document.write is not intended to be blocked by CSP, but the things it might inject e.g. inline scripts should be blocked (assuming the policy hasn't opted in to unsafe-inline for scripts, of course).
Comment 12•12 years ago
|
||
Keywords: checkin-needed
Comment 13•12 years ago
|
||
This was backed out while investigating some other bustage that landed in the same push.
Re-landed:
https://hg.mozilla.org/integration/mozilla-inbound/rev/374ff1d28158
Comment 14•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Whiteboard: [qa-]
Comment 15•12 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•