Skip to content

Commit 0a2d575

Browse files
antosartchromium-wpt-export-bot
authored andcommitted
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
1 parent b6d3b75 commit 0a2d575

9 files changed

Lines changed: 7 additions & 155 deletions

content-security-policy/embedded-enforcement/subsumption_algorithm-general.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,18 @@
6969
"returned_csp": "style-src http://*.example.com:*",
7070
"returned_csp_2": "style-src http://*.com",
7171
"expected": IframeLoad.EXPECT_LOAD },
72-
{ "name": "Iframe should block if plugin-types directive is not subsumed.",
72+
{ "name": "Removed plugin-types directive should be ignored.",
7373
"required_csp": "plugin-types application/pdf",
7474
"returned_csp": null,
75-
"expected": IframeLoad.EXPECT_BLOCK },
76-
{ "name": "Iframe should load if plugin-types directive is subsumed.",
75+
"expected": IframeLoad.EXPECT_LOAD },
76+
{ "name": "Removed plugin-types directive should be ignored 2.",
7777
"required_csp": "plugin-types application/pdf application/x-java-applet",
7878
"returned_csp": "plugin-types application/pdf",
7979
"expected": IframeLoad.EXPECT_LOAD },
80+
{ "name": "Removed plugin-types directive should be ignored 3.",
81+
"required_csp": "style-src 'none'; plugin-types application/pdf",
82+
"returned_csp": null,
83+
"expected": IframeLoad.EXPECT_BLOCK },
8084
];
8185

8286
tests.forEach(test => {

content-security-policy/plugin-types/plugintypes-empty.sub.html

Lines changed: 0 additions & 22 deletions
This file was deleted.

content-security-policy/plugin-types/plugintypes-mismatched-data.html

Lines changed: 0 additions & 22 deletions
This file was deleted.

content-security-policy/plugin-types/plugintypes-mismatched-url.html

Lines changed: 0 additions & 22 deletions
This file was deleted.

content-security-policy/plugin-types/plugintypes-notype-data.html

Lines changed: 0 additions & 23 deletions
This file was deleted.

content-security-policy/plugin-types/plugintypes-notype-url.html

Lines changed: 0 additions & 23 deletions
This file was deleted.

content-security-policy/plugin-types/plugintypes-nourl-allowed.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

content-security-policy/plugin-types/plugintypes-nourl-allowed.html.sub.headers

Lines changed: 0 additions & 2 deletions
This file was deleted.

content-security-policy/plugin-types/plugintypes-nourl-blocked.html

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)