Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Un-deprecated 'child-src' #11838

Merged
merged 1 commit into from
Jul 9, 2018
Merged

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jul 6, 2018

'child-src' is now part of the fallback chain for 'worker-src'.
This means that 'child-src' always takes precedence over 'script-src'
when checking worker requests.
Added extra tests to ensure that a worker request blocked by
'child-src' and allowed by 'script-src' is blocked.

Removed previous logic that considered 'script-src' to be the
fallback for 'worker-src' and amended tests. Removed "temporary"
logic put in place to not break sites using "child-src".

Refactored the OperativeDirective logic to ensure that the caller
does not need to be aware of precise fallback chain of the directive,
otherwise the way to get the 'worker-src' operative directive would be:

OperativeDirective(worker_src_.Get(),
OperativeDirective(child_src_.Get(),
OperativeDirective(script_src_.Get())));

To be submitted with the spec PR as it includes tests.
Spec: w3c/webappsec-csp#313

Bug: 669496
Change-Id: I7ca9552df1d0ce203a604b0e469a268f6b112e49
Reviewed-on: https://chromium-review.googlesource.com/1128087
Commit-Queue: Andy Paicu andypaicu@chromium.org
Reviewed-by: Mike West mkwst@chromium.org
Cr-Commit-Position: refs/heads/master@{#573278}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1128087 branch 2 times, most recently from d963f66 to 16b7052 Compare July 9, 2018 10:58
'child-src' is now part of the fallback chain for 'worker-src'.
This means that 'child-src' always takes precedence over 'script-src'
when checking worker requests.
Added extra tests to ensure that a worker request blocked by
'child-src' and allowed by 'script-src' is blocked.

Removed previous logic that considered 'script-src' to be the
fallback for 'worker-src' and amended tests. Removed "temporary"
logic put in place to not break sites using "child-src".

Refactored the OperativeDirective logic to ensure that the caller
does not need to be aware of precise fallback chain of the directive,
otherwise the way to get the 'worker-src' operative directive would be:

OperativeDirective(worker_src_.Get(),
      OperativeDirective(child_src_.Get(),
          OperativeDirective(script_src_.Get())));

To be submitted with the spec PR as it includes tests.
Spec: w3c/webappsec-csp#313

Bug: 669496
Change-Id: I7ca9552df1d0ce203a604b0e469a268f6b112e49
Reviewed-on: https://chromium-review.googlesource.com/1128087
Commit-Queue: Andy Paicu <andypaicu@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573278}
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1128087 branch from 16b7052 to fbd298e Compare July 9, 2018 12:57
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit dceb242 into master Jul 9, 2018
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-1128087 branch July 9, 2018 13:07
andypaicu added a commit to w3c/webappsec-csp that referenced this pull request Jul 10, 2018
* Un-deprecated child-src
* tests added in web-platform-tests/wpt#11838
ryandel8834 added a commit to ryandel8834/WebAppSec-CSP that referenced this pull request Aug 13, 2022
* Un-deprecated child-src
* tests added in web-platform-tests/wpt#11838
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants