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

Issue 1413193010: Add counters for various ways of loading scripts with bad mimetypes (Closed)

Created:
5 years, 1 month ago by Dan Ehrenberg
Modified:
5 years ago
Reviewers:
Nate Chapin, adamk
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add counters for various ways of loading scripts with bad mimetypes Unchecked use of proxies could enable cross-origin reading of some CSV files which contain sensitive non-numerical information. Tightening down mimetype checking could provide a mitigating strategy. This patch adds UseCounters to see how often scripts are used with different mimetypes to determine what could be prohibited. BUG=chromium:399951 R=adamk Committed: https://crrev.com/6f9d55e0e902b20bcb8a38be6721f498a2a973ab Cr-Commit-Position: refs/heads/master@{#364013}

Patch Set 1 #

Patch Set 2 : Fix compilation #

Patch Set 3 : Test which doesn't work #

Patch Set 4 : Tests which do work #

Total comments: 2

Patch Set 5 : Small changes for review; adding application counter #

Patch Set 6 : Fix code and tests, passing again #

Total comments: 4

Patch Set 7 : Changes from review #

Patch Set 8 : renumber #

Patch Set 9 : Rebase #

Patch Set 10 : #

Patch Set 11 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -10 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/mime/javascript-mimetype-usecounters.html View 1 2 3 4 5 6 7 8 9 1 chunk +93 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/mime/javascript-mimetype-usecounters-expected.txt View 1 2 3 4 5 1 chunk +17 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/mime/resources/javascript-mimetype.php View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptLoader.h View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptLoader.cpp View 1 2 3 4 5 6 2 chunks +27 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 48 (23 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1413193010/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1413193010/20001
5 years, 1 month ago (2015-11-02 22:53:15 UTC) #2
commit-bot: I haz the power
Dry run: No L-G-T-M from a valid reviewer yet. Only full committers are accepted. Even ...
5 years, 1 month ago (2015-11-02 22:53:17 UTC) #4
Dan Ehrenberg
PTAL
5 years, 1 month ago (2015-11-09 23:31:14 UTC) #6
adamk
Seems fine to me, but Nate is the right reviewer for this.
5 years, 1 month ago (2015-11-10 16:05:12 UTC) #7
Nate Chapin
Why is the test in http/tests/security/? Is this security related? https://codereview.chromium.org/1413193010/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp File third_party/WebKit/Source/core/dom/ScriptLoader.cpp (right): https://codereview.chromium.org/1413193010/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp#newcode374 ...
5 years, 1 month ago (2015-11-10 18:02:49 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1413193010/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1413193010/80001
5 years, 1 month ago (2015-11-23 23:27:44 UTC) #10
commit-bot: I haz the power
Dry run: No L-G-T-M from a valid reviewer yet. Only full committers are accepted. Even ...
5 years, 1 month ago (2015-11-23 23:27:45 UTC) #12
Dan Ehrenberg
Moved the tests. PTAL. https://codereview.chromium.org/1413193010/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp File third_party/WebKit/Source/core/dom/ScriptLoader.cpp (right): https://codereview.chromium.org/1413193010/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp#newcode374 third_party/WebKit/Source/core/dom/ScriptLoader.cpp:374: bool text = mimetype.lower().startsWith("text/"); On ...
5 years, 1 month ago (2015-11-24 00:55:20 UTC) #13
Nate Chapin
lgtm, just some formatting nitpicks. https://codereview.chromium.org/1413193010/diff/100001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp File third_party/WebKit/Source/core/dom/ScriptLoader.cpp (right): https://codereview.chromium.org/1413193010/diff/100001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp#newcode342 third_party/WebKit/Source/core/dom/ScriptLoader.cpp:342: if (!expectedJs) { Early ...
5 years ago (2015-12-03 17:53:33 UTC) #14
Dan Ehrenberg
https://codereview.chromium.org/1413193010/diff/100001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp File third_party/WebKit/Source/core/dom/ScriptLoader.cpp (right): https://codereview.chromium.org/1413193010/diff/100001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp#newcode342 third_party/WebKit/Source/core/dom/ScriptLoader.cpp:342: if (!expectedJs) { On 2015/12/03 at 17:53:32, Nate Chapin ...
5 years ago (2015-12-04 19:28:53 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1413193010/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1413193010/120001
5 years ago (2015-12-04 19:30:06 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/150310)
5 years ago (2015-12-04 20:07:30 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1413193010/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1413193010/120001
5 years ago (2015-12-04 21:36:36 UTC) #22
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/150659)
5 years ago (2015-12-04 23:46:10 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1413193010/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1413193010/120001
5 years ago (2015-12-05 00:04:02 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_TIMED_OUT, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/144473)
5 years ago (2015-12-05 03:40:11 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1413193010/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1413193010/120001
5 years ago (2015-12-07 19:25:46 UTC) #30
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/132718) mac_chromium_gn_rel on ...
5 years ago (2015-12-07 19:39:57 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1413193010/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1413193010/140001
5 years ago (2015-12-07 20:10:26 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/104152) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years ago (2015-12-07 22:00:35 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1413193010/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1413193010/180001
5 years ago (2015-12-09 04:21:12 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/107504)
5 years ago (2015-12-09 05:14:21 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1413193010/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1413193010/200001
5 years ago (2015-12-09 05:16:12 UTC) #45
commit-bot: I haz the power
Committed patchset #11 (id:200001)
5 years ago (2015-12-09 08:55:05 UTC) #46
commit-bot: I haz the power
5 years ago (2015-12-09 08:56:04 UTC) #48
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/6f9d55e0e902b20bcb8a38be6721f498a2a973ab
Cr-Commit-Position: refs/heads/master@{#364013}

Powered by Google App Engine
This is Rietveld 408576698