Closed
Bug 1082924
Opened 10 years ago
Closed 10 years ago
Add nsIContentPolicy::TYPE_FETCH
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: nsm, Assigned: nsm)
References
Details
(Keywords: dev-doc-complete)
Attachments
(1 file, 1 obsolete file)
6.15 KB,
patch
|
tanvi
:
review+
baku
:
review+
|
Details | Diff | Splinter Review |
The fetch specification[1] uses it for fetching Requests created by content code. Behaviour is similar to XHR in being restricted by CSP directive connect-src.
[1]: https://fetch.spec.whatwg.org
Assignee | ||
Updated•10 years ago
|
Blocks: dom-fetch-api
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → nsm.nikhil
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•10 years ago
|
||
Comment on attachment 8505111 [details] [diff] [review]
Add CSP type for fetch API
Tanvi for content/
Andrea for dom/fetch oneliner.
Attachment #8505111 -
Flags: review?(tanvi)
Attachment #8505111 -
Flags: review?(amarchesini)
Comment 3•10 years ago
|
||
Comment on attachment 8505111 [details] [diff] [review]
Add CSP type for fetch API
Review of attachment 8505111 [details] [diff] [review]:
-----------------------------------------------------------------
I'm not familiar with nsIContentPolicy.
Attachment #8505111 -
Flags: review?(amarchesini)
Comment 4•10 years ago
|
||
Comment on attachment 8505111 [details] [diff] [review]
Add CSP type for fetch API
Do other content policies need to be updated? Examples -
https://mxr.mozilla.org/mozilla-central/source/content/base/src/nsDataDocumentContentPolicy.cpp#118
https://mxr.mozilla.org/mozilla-central/source/content/base/src/nsNoDataProtocolContentPolicy.cpp#34
https://mxr.mozilla.org/mozilla-central/source/embedding/browser/nsWebBrowserContentPolicy.cpp#49
Can we add a CSP test for this?
Attachment #8505111 -
Flags: review?(tanvi)
Assignee | ||
Comment 5•10 years ago
|
||
Tanvi, so I can only really test the TYPE_FETCH in the fetch specification tests (Bug dom-fetch-api) since fetch() is the only user of the type. I will add tests there in the patches that add CSP support (not up yet) and mark you for review there. Does that sound good?
Comment 6•10 years ago
|
||
https://mxr.mozilla.org/mozilla-central/source/content/base/src/nsDataDocumentContentPolicy.cpp#118 should probably use a whitelist instead of a blacklist. I'll file a bug for that. For now, please add TYPE_FETCH to the blacklist.
Comment 7•10 years ago
|
||
(In reply to Nikhil Marathe [:nsm] (needinfo? please) from comment #5)
> Tanvi, so I can only really test the TYPE_FETCH in the fetch specification
> tests (Bug dom-fetch-api) since fetch() is the only user of the type. I will
> add tests there in the patches that add CSP support (not up yet) and mark
> you for review there. Does that sound good?
That sounds good.
Assignee | ||
Comment 8•10 years ago
|
||
With check added to nsData...
Attachment #8506617 -
Flags: review?(tanvi)
Assignee | ||
Updated•10 years ago
|
Attachment #8505111 -
Attachment is obsolete: true
Assignee | ||
Comment 9•10 years ago
|
||
Comment on attachment 8506617 [details] [diff] [review]
Add CSP type for fetch API
Andrea, the review isn't for the CSP, but for setting Request::mContext in GetRequestConstructorCopy as defined by the fetch spec in Request constructor step 3.
Attachment #8506617 -
Flags: review?(amarchesini)
Updated•10 years ago
|
Attachment #8506617 -
Flags: review?(amarchesini) → review+
Comment 10•10 years ago
|
||
Comment on attachment 8506617 [details] [diff] [review]
Add CSP type for fetch API
Please be sure to add a csp test for TYPE_FETCH in bug dom-fetch-api. Thanks!
Attachment #8506617 -
Flags: review?(tanvi) → review+
Assignee | ||
Comment 11•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Updated•9 years ago
|
Keywords: dev-doc-needed
Comment 13•9 years ago
|
||
Updated document: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIContentPolicy
Added to: https://developer.mozilla.org/en-US/Firefox/Releases/36
Keywords: dev-doc-needed → dev-doc-complete
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•