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

Issue 2003963004: Enable CSP on more WebUI pages (Closed)

Created:
4 years, 7 months ago by wychen
Modified:
4 years, 6 months ago
CC:
chromium-reviews, dbeam+watch-ntp_chromium.org, caseq+blink_chromium.org, jam, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, darin-cc_chromium.org, devtools-reviews_chromium.org, blink-reviews, apavlov+blink_chromium.org, sergeyv+blink_chromium.org, kozyatinskiy+blink_chromium.org, pedrosimonetti+watch_chromium.org
Base URL:
https://chromium.googlesource.com/a/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Enable CSP on more WebUI pages Overriding ShouldAddContentSecurityPolicy() to disable CSP is considered a bug. Enabling CSP while overriding GetContentSecurityPolicyScriptSrc() to have relaxed rule is better. BUG=81636 Committed: https://crrev.com/f59e6634e5e0ac4475b06fa02bbca7b8935d858c Cr-Commit-Position: refs/heads/master@{#397816}

Patch Set 1 #

Patch Set 2 : fix new tab #

Total comments: 6

Patch Set 3 : address comments #

Total comments: 10

Patch Set 4 : revert devtools, fix comments, split methods #

Total comments: 9

Patch Set 5 : fix oopsies #

Total comments: 8

Patch Set 6 : fix typo in comments #

Total comments: 8

Patch Set 7 : address comments #

Patch Set 8 : indentation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -32 lines) Patch
M chrome/browser/ui/webui/app_launcher_page_ui.h View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/app_launcher_page_ui.cc View 1 2 3 4 5 6 7 1 chunk +15 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/interstitials/interstitial_ui.cc View 1 2 3 4 5 6 2 chunks +14 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/ntp/new_tab_ui.h View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/ntp/new_tab_ui.cc View 1 2 3 4 5 6 7 1 chunk +20 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/system_info_ui.cc View 1 2 3 4 5 6 7 1 chunk +9 lines, -1 line 0 comments Download
M components/dom_distiller/content/browser/dom_distiller_viewer_source.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/dom_distiller/content/browser/dom_distiller_viewer_source.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/webui/url_data_manager_backend.cc View 1 2 3 8 chunks +28 lines, -13 lines 0 comments Download
M content/public/browser/url_data_source.h View 1 2 3 4 5 1 chunk +16 lines, -5 lines 0 comments Download
M content/public/browser/url_data_source.cc View 1 2 3 4 5 6 2 chunks +15 lines, -0 lines 0 comments Download

Messages

Total messages: 53 (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/2003963004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2003963004/1
4 years, 7 months ago (2016-05-24 09:19:30 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2003963004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2003963004/20001
4 years, 7 months ago (2016-05-24 10:43:50 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-24 15:02:10 UTC) #6
wychen
avi@, could you take a look at URL data source? Thanks!
4 years, 7 months ago (2016-05-24 23:05:01 UTC) #9
pfeldman
https://codereview.chromium.org/2003963004/diff/20001/third_party/WebKit/Source/devtools/front_end/inspector.html File third_party/WebKit/Source/devtools/front_end/inspector.html (left): https://codereview.chromium.org/2003963004/diff/20001/third_party/WebKit/Source/devtools/front_end/inspector.html#oldcode10 third_party/WebKit/Source/devtools/front_end/inspector.html:10: <meta http-equiv="Content-Security-Policy" content="object-src 'none'; script-src 'self' 'unsafe-eval' https://chrome-devtools-frontend.appspot.com"> This ...
4 years, 7 months ago (2016-05-24 23:09:31 UTC) #13
pfeldman
Why is this happening? Is there a bug for it?
4 years, 7 months ago (2016-05-24 23:09:54 UTC) #15
Avi (use Gerrit)
Yep, you need a bug here. This looks reasonable, but I'm not a CSP person. ...
4 years, 7 months ago (2016-05-24 23:15:07 UTC) #16
wychen
tsepez@, could you take a look? Thanks! https://codereview.chromium.org/2003963004/diff/20001/content/public/browser/url_data_source.h File content/public/browser/url_data_source.h (right): https://codereview.chromium.org/2003963004/diff/20001/content/public/browser/url_data_source.h#newcode98 content/public/browser/url_data_source.h:98: // It ...
4 years, 7 months ago (2016-05-25 12:55:08 UTC) #19
pfeldman
https://codereview.chromium.org/2003963004/diff/40001/chrome/browser/ui/webui/devtools_ui.cc File chrome/browser/ui/webui/devtools_ui.cc (right): https://codereview.chromium.org/2003963004/diff/40001/chrome/browser/ui/webui/devtools_ui.cc#newcode180 chrome/browser/ui/webui/devtools_ui.cc:180: std::string DevToolsDataSource::GetContentSecurityPolicyScriptSrc() const { Changes to this file are ...
4 years, 7 months ago (2016-05-25 14:18:38 UTC) #20
Tom Sepez
https://codereview.chromium.org/2003963004/diff/40001/chrome/browser/ui/webui/app_launcher_page_ui.cc File chrome/browser/ui/webui/app_launcher_page_ui.cc (right): https://codereview.chromium.org/2003963004/diff/40001/chrome/browser/ui/webui/app_launcher_page_ui.cc#newcode136 chrome/browser/ui/webui/app_launcher_page_ui.cc:136: // Add 'unsafe-inline' to script-src. Note that unsafe-inline is ...
4 years, 7 months ago (2016-05-25 19:20:56 UTC) #21
wychen
https://codereview.chromium.org/2003963004/diff/40001/chrome/browser/ui/webui/app_launcher_page_ui.cc File chrome/browser/ui/webui/app_launcher_page_ui.cc (right): https://codereview.chromium.org/2003963004/diff/40001/chrome/browser/ui/webui/app_launcher_page_ui.cc#newcode136 chrome/browser/ui/webui/app_launcher_page_ui.cc:136: // Add 'unsafe-inline' to script-src. On 2016/05/25 19:20:56, Tom ...
4 years, 7 months ago (2016-05-25 22:49:42 UTC) #24
Tom Sepez
Good. Getting closer https://codereview.chromium.org/2003963004/diff/100001/chrome/browser/ui/webui/interstitials/interstitial_ui.cc File chrome/browser/ui/webui/interstitials/interstitial_ui.cc (right): https://codereview.chromium.org/2003963004/diff/100001/chrome/browser/ui/webui/interstitials/interstitial_ui.cc#newcode320 chrome/browser/ui/webui/interstitials/interstitial_ui.cc:320: "style-src 'self' 'unsafe-inline';" Here we're still ...
4 years, 7 months ago (2016-05-25 23:07:03 UTC) #27
Tom Sepez
Even closer. https://codereview.chromium.org/2003963004/diff/120001/chrome/browser/ui/webui/ntp/new_tab_ui.cc File chrome/browser/ui/webui/ntp/new_tab_ui.cc (right): https://codereview.chromium.org/2003963004/diff/120001/chrome/browser/ui/webui/ntp/new_tab_ui.cc#newcode244 chrome/browser/ui/webui/ntp/new_tab_ui.cc:244: const { Looks like we lost the ...
4 years, 7 months ago (2016-05-26 16:00:03 UTC) #28
wychen
https://codereview.chromium.org/2003963004/diff/100001/chrome/browser/ui/webui/interstitials/interstitial_ui.cc File chrome/browser/ui/webui/interstitials/interstitial_ui.cc (right): https://codereview.chromium.org/2003963004/diff/100001/chrome/browser/ui/webui/interstitials/interstitial_ui.cc#newcode320 chrome/browser/ui/webui/interstitials/interstitial_ui.cc:320: "style-src 'self' 'unsafe-inline';" On 2016/05/25 23:07:03, Tom Sepez wrote: ...
4 years, 7 months ago (2016-05-26 17:54:24 UTC) #29
wychen
https://codereview.chromium.org/2003963004/diff/120001/chrome/browser/ui/webui/ntp/new_tab_ui.cc File chrome/browser/ui/webui/ntp/new_tab_ui.cc (right): https://codereview.chromium.org/2003963004/diff/120001/chrome/browser/ui/webui/ntp/new_tab_ui.cc#newcode244 chrome/browser/ui/webui/ntp/new_tab_ui.cc:244: const { On 2016/05/26 16:00:03, Tom Sepez wrote: > ...
4 years, 7 months ago (2016-05-26 18:00:42 UTC) #30
Tom Sepez
Thanks for taking this to completion. https://codereview.chromium.org/2003963004/diff/120001/chrome/browser/ui/webui/ntp/new_tab_ui.cc File chrome/browser/ui/webui/ntp/new_tab_ui.cc (right): https://codereview.chromium.org/2003963004/diff/120001/chrome/browser/ui/webui/ntp/new_tab_ui.cc#newcode244 chrome/browser/ui/webui/ntp/new_tab_ui.cc:244: const { On ...
4 years, 7 months ago (2016-05-26 18:04:41 UTC) #31
Tom Sepez
lgtm
4 years, 7 months ago (2016-05-26 18:04:50 UTC) #32
Avi (use Gerrit)
lgtm with typo fixed. https://codereview.chromium.org/2003963004/diff/120001/content/public/browser/url_data_source.h File content/public/browser/url_data_source.h (right): https://codereview.chromium.org/2003963004/diff/120001/content/public/browser/url_data_source.h#newcode97 content/public/browser/url_data_source.h:97: // For pre-exsiting code, enabling ...
4 years, 7 months ago (2016-05-26 20:20:56 UTC) #33
wychen
https://codereview.chromium.org/2003963004/diff/120001/content/public/browser/url_data_source.h File content/public/browser/url_data_source.h (right): https://codereview.chromium.org/2003963004/diff/120001/content/public/browser/url_data_source.h#newcode97 content/public/browser/url_data_source.h:97: // For pre-exsiting code, enabling CSP with relaxed script-src ...
4 years, 7 months ago (2016-05-26 21:05:52 UTC) #34
wychen
Ping dbeam@ and mdjones@. PTAL. Thanks!
4 years, 6 months ago (2016-05-27 18:18:27 UTC) #35
mdjones
lgtm
4 years, 6 months ago (2016-05-27 21:07:57 UTC) #36
Dan Beam
lgtm https://codereview.chromium.org/2003963004/diff/140001/chrome/browser/ui/webui/app_launcher_page_ui.cc File chrome/browser/ui/webui/app_launcher_page_ui.cc (right): https://codereview.chromium.org/2003963004/diff/140001/chrome/browser/ui/webui/app_launcher_page_ui.cc#newcode136 chrome/browser/ui/webui/app_launcher_page_ui.cc:136: // Add 'unsafe-inline' to script-src. can you annotate ...
4 years, 6 months ago (2016-05-31 21:46:09 UTC) #39
wychen
https://codereview.chromium.org/2003963004/diff/140001/chrome/browser/ui/webui/app_launcher_page_ui.cc File chrome/browser/ui/webui/app_launcher_page_ui.cc (right): https://codereview.chromium.org/2003963004/diff/140001/chrome/browser/ui/webui/app_launcher_page_ui.cc#newcode136 chrome/browser/ui/webui/app_launcher_page_ui.cc:136: // Add 'unsafe-inline' to script-src. On 2016/05/31 21:46:09, Dan ...
4 years, 6 months ago (2016-05-31 23:04:34 UTC) #40
Dan Beam
https://codereview.chromium.org/2003963004/diff/140001/chrome/browser/ui/webui/ntp/new_tab_ui.cc File chrome/browser/ui/webui/ntp/new_tab_ui.cc (right): https://codereview.chromium.org/2003963004/diff/140001/chrome/browser/ui/webui/ntp/new_tab_ui.cc#newcode235 chrome/browser/ui/webui/ntp/new_tab_ui.cc:235: "*.google.com *.gstatic.com;"; On 2016/05/31 23:04:34, wychen wrote: > On ...
4 years, 6 months ago (2016-05-31 23:13:14 UTC) #41
wychen
https://codereview.chromium.org/2003963004/diff/140001/chrome/browser/ui/webui/ntp/new_tab_ui.cc File chrome/browser/ui/webui/ntp/new_tab_ui.cc (right): https://codereview.chromium.org/2003963004/diff/140001/chrome/browser/ui/webui/ntp/new_tab_ui.cc#newcode235 chrome/browser/ui/webui/ntp/new_tab_ui.cc:235: "*.google.com *.gstatic.com;"; On 2016/05/31 23:13:14, Dan Beam wrote: > ...
4 years, 6 months ago (2016-06-01 00:19:19 UTC) #42
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2003963004/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2003963004/180001
4 years, 6 months ago (2016-06-01 08:48:10 UTC) #44
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-01 09:47:08 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2003963004/180001
4 years, 6 months ago (2016-06-03 19:30:42 UTC) #49
commit-bot: I haz the power
Committed patchset #8 (id:180001)
4 years, 6 months ago (2016-06-03 22:04:11 UTC) #51
commit-bot: I haz the power
4 years, 6 months ago (2016-06-03 22:06:58 UTC) #53
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/f59e6634e5e0ac4475b06fa02bbca7b8935d858c
Cr-Commit-Position: refs/heads/master@{#397816}

Powered by Google App Engine
This is Rietveld 408576698