Skip to content

Commit

Permalink
Bug 1690981 [wpt PR 27500] - CSP: Remove 'plugin-types' directive, a=…
Browse files Browse the repository at this point in the history
…testonly

Automatic update from web-platform-tests
CSP: Remove 'plugin-types' directive

The Content Security Policy directive 'plugin-types' is being removed
by the specification
(w3c/webappsec-csp#456). This CL removes the
code parsing and checking the 'plugin-types' directive from Blink and
from the services/network CSP parser. All WP tests for plugin-types
are removed, too.

When parsing a plugin-types directive, we display a console error
message informing that the directive has been removed and that
object-src can be used instead.

Bug: 1168001
Change-Id: I61420677a0f11f8daf46c473e578d66c932751d1
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2643282
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Antonio Sartori <antoniosartori@chromium.org>
Cr-Commit-Position: refs/heads/master@{#851760}

--

wpt-commits: 8959b13684b68186781340c044d9c1b62a388358
wpt-pr: 27500
  • Loading branch information
antosart authored and moz-wptsync-bot committed Feb 12, 2021
1 parent d5c8ff4 commit b07391d
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 155 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,18 @@
"returned_csp": "style-src http://*.example.com:*",
"returned_csp_2": "style-src http://*.com",
"expected": IframeLoad.EXPECT_LOAD },
{ "name": "Iframe should block if plugin-types directive is not subsumed.",
{ "name": "Removed plugin-types directive should be ignored.",
"required_csp": "plugin-types application/pdf",
"returned_csp": null,
"expected": IframeLoad.EXPECT_BLOCK },
{ "name": "Iframe should load if plugin-types directive is subsumed.",
"expected": IframeLoad.EXPECT_LOAD },
{ "name": "Removed plugin-types directive should be ignored 2.",
"required_csp": "plugin-types application/pdf application/x-java-applet",
"returned_csp": "plugin-types application/pdf",
"expected": IframeLoad.EXPECT_LOAD },
{ "name": "Removed plugin-types directive should be ignored 3.",
"required_csp": "style-src 'none'; plugin-types application/pdf",
"returned_csp": null,
"expected": IframeLoad.EXPECT_BLOCK },
];

tests.forEach(test => {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit b07391d

Please sign in to comment.