TIghten CSP for activity stream
Categories
(Firefox :: Messaging System, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: ckerschb, Assigned: k88hudson)
References
(Blocks 1 open bug)
Details
(Keywords: github-merged)
Attachments
(3 files, 2 obsolete files)
Reporter | ||
Comment 1•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Comment 2•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Reporter | ||
Comment 3•6 years ago
|
||
Drive by note: Removing 'unsafe-inline' from script-src is definitely the way to go and I am really happy to see that happening. Ultimately it would be great if we could also remove unsafe-inline from style-src and load all stylesheets from a file instead of inlining it - but we could do that in a follow up.
For this revision however - would it be possible to add object-src 'none'?
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
(In reply to Christoph Kerschbaumer [:ckerschb] from comment #3)
Ultimately it would be great if we could also remove unsafe-inline from style-src and load all stylesheets from a file instead of inlining it - but we could do that in a follow up.
Bug 1513311 uses CSSOM to dynamically add a sheet and rules to sanitize css-ish json from the server, so that approach would probably need to change to work without inline styles.
Assignee | ||
Updated•6 years ago
|
Comment 6•6 years ago
|
||
freddyb, we're running into mochitest failures:
Console message: [JavaScript Error: "Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”)." {file: "about:newtab" line: 16}]
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=228060887&repo=try&lineNumber=1980-1987
Have you seen those before related to testing? My current guess is ContentTask.spawn ends up stringifying a function to send as a message to then eval in the content side. Is there a way to disable CSP when testing?
Comment 7•6 years ago
|
||
Reverted with https://github.com/mozilla/activity-stream/commit/a3fe11f0f32415c98fa7a31b996735b4d580bfb1
Updated•6 years ago
|
Comment 8•6 years ago
|
||
(In reply to Ed Lee :Mardak from comment #6)
freddyb, we're running into mochitest failures:
Console message: [JavaScript Error: "Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”)." {file: "about:newtab" line: 16}]
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=228060887&repo=try&lineNumber=1980-1987Have you seen those before related to testing? My current guess is ContentTask.spawn ends up stringifying a function to send as a message to then eval in the content side. Is there a way to disable CSP when testing?
This error message complains about inline script, so it must be either a <script>...</script>
tag or an on..
attribute event handler.
eval
related errors get a different message (An attempt to call JavaScript from a string (by calling a function like eval) has been blocked
).
Updated•6 years ago
|
Comment 9•6 years ago
|
||
Assignee | ||
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 12•6 years ago
|
||
Updated•6 years ago
|
Comment 13•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Description
•