Skip to content

Commit

Permalink
CSP: Remove 'plugin-types' directive
Browse files Browse the repository at this point in the history
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
  • Loading branch information
antosart authored and chromium-wpt-export-bot committed Feb 5, 2021
1 parent b6d3b75 commit 0a2d575
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
22 changes: 0 additions & 22 deletions content-security-policy/plugin-types/plugintypes-empty.sub.html

This file was deleted.

This file was deleted.

This file was deleted.

23 changes: 0 additions & 23 deletions content-security-policy/plugin-types/plugintypes-notype-data.html

This file was deleted.

23 changes: 0 additions & 23 deletions content-security-policy/plugin-types/plugintypes-notype-url.html

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 0a2d575

Please sign in to comment.