Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Issue 76303002: CSP: Check <param> element values against the document's CSP before loading. (Closed)

Created:
7 years, 1 month ago by Mike West
Modified:
6 years, 11 months ago
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org, mkwst+watchlist_chromium.org, jochen (gone - plz use gerrit)
Visibility:
Public.

Description

CSP: Check <param> element values against the document's CSP before loading. We ought to take account of the 'param' element parsing behavior that happens in 'HTMLObjectElement'. This patch moves the pluginIsLoadable check to make that happen. To avoid 'setTimeout' in the test, and to align with the spec[1], this patch also starts dispatching an 'error' event on load failure for 'object' elements. [1]: #4.6 ("If the load failed...") of http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#the-object-element BUG=320796 R=tsepez@chromium.org,abarth@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=164952

Patch Set 1 #

Patch Set 2 : Event. #

Total comments: 8

Patch Set 3 : Feedback. #

Patch Set 4 : Empty URLs. #

Patch Set 5 : Async. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -14 lines) Patch
M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-url-expected.txt View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-code-blocked.html View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-code-blocked-expected.txt View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-movie-blocked.html View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-movie-blocked-expected.txt View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-src-blocked.html View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-src-blocked-expected.txt View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-url-blocked.html View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-url-blocked-expected.txt View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/resources/object-src-param.js View 1 2 3 4 1 chunk +29 lines, -0 lines 0 comments Download
M Source/core/html/HTMLObjectElement.cpp View 1 2 3 4 3 chunks +15 lines, -6 lines 0 comments Download
M Source/core/html/HTMLPlugInElement.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLPlugInElement.cpp View 1 2 3 4 4 chunks +11 lines, -3 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Mike West
Tom, mind taking a look? -mike
7 years, 1 month ago (2013-11-19 14:45:48 UTC) #1
abarth-chromium
LGTM assuming the test isn't flaky. https://codereview.chromium.org/76303002/diff/30001/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-blocked-expected.txt File LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-blocked-expected.txt (right): https://codereview.chromium.org/76303002/diff/30001/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-blocked-expected.txt#newcode13 LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-blocked-expected.txt:13: This test passes ...
7 years, 1 month ago (2013-11-19 17:22:07 UTC) #2
Tom Sepez
LGTM with comments. https://codereview.chromium.org/76303002/diff/30001/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-blocked.html File LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-blocked.html (right): https://codereview.chromium.org/76303002/diff/30001/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-blocked.html#newcode15 LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-blocked.html:15: var names = ['src', 'movie', 'code', ...
7 years, 1 month ago (2013-11-19 17:54:22 UTC) #3
Mike West
Thank you both. I'll fix this up tomorrow and CQ it. https://codereview.chromium.org/76303002/diff/30001/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-blocked-expected.txt File LayoutTests/http/tests/security/contentSecurityPolicy/object-src-param-blocked-expected.txt (right): ...
7 years, 1 month ago (2013-11-19 18:35:05 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mkwst@chromium.org/76303002/130001
7 years, 1 month ago (2013-11-20 09:50:46 UTC) #5
commit-bot: I haz the power
Retried try job too often on linux_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink_rel&number=13217
7 years, 1 month ago (2013-11-20 11:14:02 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mkwst@chromium.org/76303002/280001
7 years, 1 month ago (2013-11-20 12:00:51 UTC) #7
commit-bot: I haz the power
Retried try job too often on win_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_blink_rel&number=18104
7 years, 1 month ago (2013-11-20 14:00:27 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mkwst@chromium.org/76303002/280001
7 years, 1 month ago (2013-11-20 14:19:45 UTC) #9
commit-bot: I haz the power
Retried try job too often on win_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_blink_rel&number=18122
7 years, 1 month ago (2013-11-20 16:48:05 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mkwst@chromium.org/76303002/470001
6 years, 11 months ago (2014-01-13 08:03:17 UTC) #11
commit-bot: I haz the power
6 years, 11 months ago (2014-01-13 09:07:59 UTC) #12
Message was sent while issue was closed.
Change committed as 164952

Powered by Google App Engine
This is Rietveld 408576698