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

Issue 2331213002: Add `disposition` to SecurityPolicyViolationEvent (Closed)

Created:
4 years, 3 months ago by Sergey Shekyan
Modified:
4 years, 2 months ago
CC:
android-webview-reviews_chromium.org, blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add `disposition` to SecurityPolicyViolationEvent Recently, Content Security Policy specification introduced disposition of violation [1]. This change extends the SecurityPolicyVioaltionEvent with `disposition` property, that indicates the disposition of the violated policy. Property value is a read-only string that corresponds to the policy disposition [2], and can be either "enforce" or "report". [1] https://w3c.github.io/webappsec-csp/#violation-disposition [2] https://w3c.github.io/webappsec-csp/#policy-disposition Intent to Ship - https://groups.google.com/a/chromium.org/d/topic/blink-dev/ip4dmVNr15Y/discussion BUG=646021 R=mkwst@chromium.org Committed: https://crrev.com/ce907c889943d12088f498aff2f2a9cc29420613 Cr-Commit-Position: refs/heads/master@{#425438}

Patch Set 1 #

Patch Set 2 : Update expected results #

Total comments: 8

Patch Set 3 : Use enum in SecurityPolicyViolationEvent #

Total comments: 6

Patch Set 4 : Cleaner static string definition, refactored SecurityPolicyViolationEvent #

Patch Set 5 : Update SecurityPolicyViolationEventInit.idl #

Total comments: 1

Patch Set 6 : Default disposition to "enforce", update tests #

Patch Set 7 : Update test #

Patch Set 8 : Update SecurityPolicyViolationEventInit.idl, update test #

Total comments: 4

Patch Set 9 : Addressed comments #

Patch Set 10 : Rebase #

Patch Set 11 : Fix a typo in rebased test expectation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -60 lines) Patch
M android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/constructors/security-policy-violation-event-constructor.html View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/constructors/security-policy-violation-event-constructor-expected.txt View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode-and-sends-report-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/eval-blocked-and-sends-report-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-and-enforce-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-data-uri-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-uri-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-only-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-multiple.php View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-multiple-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-multiple-reversed-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-scheme-relative-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-basics.html View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-basics-expected.txt View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image.html View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-from-script.html View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-from-script-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image.html View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image-from-script.html View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image-from-script-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/mixedContent/strict-mode-image-blocked.https.html View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/mixedContent/strict-mode-image-reportonly.https.php View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/events/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h View 1 2 3 4 5 6 7 8 9 4 chunks +4 lines, -26 lines 0 comments Download
A third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +80 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.idl View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/SecurityPolicyViolationEventInit.idl View 1 2 3 4 6 7 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp View 1 2 3 4 5 6 7 8 9 5 chunks +13 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp View 1 2 3 4 5 6 7 8 9 5 chunks +7 lines, -1 line 0 comments Download

Messages

Total messages: 100 (72 generated)
Mike West
https://codereview.chromium.org/2331213002/diff/20001/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h File third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h (right): https://codereview.chromium.org/2331213002/diff/20001/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h#newcode94 third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h:94: String m_disposition; Rather than storing a new copy of ...
4 years, 3 months ago (2016-09-14 13:03:01 UTC) #9
Sergey Shekyan
https://codereview.chromium.org/2331213002/diff/20001/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h File third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h (right): https://codereview.chromium.org/2331213002/diff/20001/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h#newcode94 third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h:94: String m_disposition; On 2016/09/14 13:03:01, Mike West wrote: > ...
4 years, 3 months ago (2016-09-16 05:36:45 UTC) #12
Sergey Shekyan
https://codereview.chromium.org/2331213002/diff/40001/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h File third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h (right): https://codereview.chromium.org/2331213002/diff/40001/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h#newcode30 third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h:30: #include "platform/network/ContentSecurityPolicyParsers.h" I am not sure if I should ...
4 years, 3 months ago (2016-09-16 05:38:02 UTC) #13
Mike West
n https://codereview.chromium.org/2331213002/diff/40001/third_party/WebKit/Source/core/events/EventTypeNames.in File third_party/WebKit/Source/core/events/EventTypeNames.in (right): https://codereview.chromium.org/2331213002/diff/40001/third_party/WebKit/Source/core/events/EventTypeNames.in#newcode91 third_party/WebKit/Source/core/events/EventTypeNames.in:91: enforce I don't understand why you're adding these? ...
4 years, 3 months ago (2016-09-16 07:30:35 UTC) #14
Sergey Shekyan
https://codereview.chromium.org/2331213002/diff/40001/third_party/WebKit/Source/core/events/EventTypeNames.in File third_party/WebKit/Source/core/events/EventTypeNames.in (right): https://codereview.chromium.org/2331213002/diff/40001/third_party/WebKit/Source/core/events/EventTypeNames.in#newcode91 third_party/WebKit/Source/core/events/EventTypeNames.in:91: enforce On 2016/09/16 07:30:35, Mike West wrote: > I ...
4 years, 3 months ago (2016-09-16 15:41:41 UTC) #15
Sergey Shekyan
https://codereview.chromium.org/2331213002/diff/80001/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.idl File third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.idl (right): https://codereview.chromium.org/2331213002/diff/80001/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.idl#newcode27 third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.idl:27: enum SecurityPolicyViolationEventDisposition { is this name too long? `PolicyDisposition`, ...
4 years, 3 months ago (2016-09-19 07:07:41 UTC) #20
Sergey Shekyan
https://codereview.chromium.org/2331213002/diff/140001/third_party/WebKit/LayoutTests/fast/events/constructors/security-policy-violation-event-constructor.html File third_party/WebKit/LayoutTests/fast/events/constructors/security-policy-violation-event-constructor.html (right): https://codereview.chromium.org/2331213002/diff/140001/third_party/WebKit/LayoutTests/fast/events/constructors/security-policy-violation-event-constructor.html#newcode42 third_party/WebKit/LayoutTests/fast/events/constructors/security-policy-violation-event-constructor.html:42: // Enum members throw on unknown initializer values. I ...
4 years, 3 months ago (2016-09-21 21:35:07 UTC) #45
Sergey Shekyan
On 2016/09/21 21:35:07, Sergey Shekyan wrote: > https://codereview.chromium.org/2331213002/diff/140001/third_party/WebKit/LayoutTests/fast/events/constructors/security-policy-violation-event-constructor.html > File > third_party/WebKit/LayoutTests/fast/events/constructors/security-policy-violation-event-constructor.html > (right): > ...
4 years, 2 months ago (2016-09-28 17:38:09 UTC) #46
Mike West
LGTM. Since this is altering the public signature of the event, we'll need an API ...
4 years, 2 months ago (2016-09-29 10:11:50 UTC) #48
jochen (gone - plz use gerrit)
changes to shipped IDL files should come with an intent to ship. can you send ...
4 years, 2 months ago (2016-09-29 12:23:43 UTC) #49
Sergey Shekyan
On 2016/09/29 12:23:43, jochen (slow) wrote: > changes to shipped IDL files should come with ...
4 years, 2 months ago (2016-09-30 05:43:49 UTC) #57
jochen (gone - plz use gerrit)
On 2016/09/30 at 05:43:49, shekyan wrote: > On 2016/09/29 12:23:43, jochen (slow) wrote: > > ...
4 years, 2 months ago (2016-09-30 10:48:01 UTC) #58
jochen (gone - plz use gerrit)
lgtm
4 years, 2 months ago (2016-09-30 15:10:40 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2331213002/160001
4 years, 2 months ago (2016-10-02 23:05:16 UTC) #62
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/271611)
4 years, 2 months ago (2016-10-02 23:10:07 UTC) #64
Sergey Shekyan
On 2016/10/02 23:10:07, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 2 months ago (2016-10-07 17:41:42 UTC) #65
foolip
On 2016/10/07 17:41:42, Sergey Shekyan wrote: > On 2016/10/02 23:10:07, commit-bot: I haz the power ...
4 years, 2 months ago (2016-10-10 08:22:36 UTC) #66
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2331213002/160001
4 years, 2 months ago (2016-10-10 08:22:53 UTC) #68
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/83305) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 2 months ago (2016-10-10 08:25:03 UTC) #70
foolip
Well, now needs rebase.
4 years, 2 months ago (2016-10-10 08:39:49 UTC) #71
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2331213002/220001
4 years, 2 months ago (2016-10-12 23:39:35 UTC) #87
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/279892)
4 years, 2 months ago (2016-10-12 23:49:58 UTC) #89
Sergey Shekyan
On 2016/10/12 23:49:58, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 2 months ago (2016-10-12 23:54:00 UTC) #91
Nico
I'm not an owner in android_webview. Replacing myself with michaelbai, who is. michaelbai, can you ...
4 years, 2 months ago (2016-10-14 15:29:48 UTC) #93
michaelbai
android_webview LGTM
4 years, 2 months ago (2016-10-14 17:08:06 UTC) #94
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2331213002/220001
4 years, 2 months ago (2016-10-14 17:22:08 UTC) #96
commit-bot: I haz the power
Committed patchset #11 (id:220001)
4 years, 2 months ago (2016-10-14 19:49:55 UTC) #98
commit-bot: I haz the power
4 years, 2 months ago (2016-10-14 19:53:58 UTC) #100
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/ce907c889943d12088f498aff2f2a9cc29420613
Cr-Commit-Position: refs/heads/master@{#425438}

Powered by Google App Engine
This is Rietveld 408576698