-
Notifications
You must be signed in to change notification settings - Fork 78
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
Consider removing plugin-types #394
Comments
Basically It's not reasonable to have cases where one must use This seems like a CSP-EE type control, so maybe moving this to CSP-EE, which has a negotiation mechanism, might make sense. |
The only reason I use plugin-types is because Chrome, Edge, and Safari all fire CSP violation events if you set (Firefox's PDF viewer is built in JavaScript using the To avoid the violations, I have to set If we are going to remove |
@Sora2455 That's useful to know. If you have the energy, I would file bug reports with the browsers directly and link to them from here. |
I tried to produce a reduced test case, only I couldn't reproduce my error. I combed through my CSP logs more carefully, and now I actually think it's just Safari that has the bug (the Edge and Chrome violations appear to be because of Ext.net usage). So now I have a reduced test case, but not access to a Safari browser to test it in. Bummer. This page claims that setting rel="noreferrer" fixes the issue, so I'll try that and let you know if I stop getting Safari CSP violations. |
I think @sirdarckcat and @terjanq looked into plugin-types for cross-origin MIME type search and the conclusion was that it was not possible to use it to do so. I did some tests and CSP appears to block the load of the resource only if the type attribute doesn't match the directive. It doesn't seem to take into consideration the actual mime type of the cross-origin resource (testcase). |
Okay, so that means that the one implementation of this feature is also non-compliant. That even more strongly suggests it ought to be removed. |
The spec should certainly line up with what vendors are doing, and I'm willing to be convinced that there's no value to the header at all, but I'm loath to just remove it, as there are absolutely sites out there that lock themselves down to only the PDF plugin because of Chrome's implementation details. At a glance, 10,190 response's headers in HTTP Archive contain both the strings |
I haven't encountered my error again after implementing |
@mikewest is there still value now that PDF is the sole "plugin"? But also, unless other implementers adopt this I don't think it has passed the test of belonging in a standard. |
On the "other implementers" point, it does something in WebKit (see HTMLPluginImageElement::canLoadPluginContent for instance). It doesn't look to do the same things it does in Chrome, of course, which is a good argument in favor of changing the status quo. Given that plugins are dead (huzzah!), I agree that it makes sense to remove the directive both from the spec and from implementations (though possibly keeping some special devtools behavior for the It's also worth thinking about |
Yeah, that would be good. |
This change removes the plugin-types directive and related algorithms. Cf. w3c#394 for background
This change removes the plugin-types directive and related algorithms. Cf. w3c#394 for background
This change removes the plugin-types directive and related algorithms. Cf. w3c#394 for background
This change removes the plugin-types directive and related algorithms. Cf. #394 for background
w3c/webappsec-csp#394 completely removed the plugin-types directive from the CSP spec. So it’s now deprecated and no longer part of any current spec.
Yes, I forgot to close this. |
Cheers - thanks |
w3c/webappsec-csp@e9895ed (w3c/webappsec-csp#394) completely removed the plugin-types directive from the CSP spec. So this patch marks it deprecated:true and standard_track:false
w3c/webappsec-csp@e9895ed (w3c/webappsec-csp#394) completely removed the plugin-types directive from the CSP spec. So this patch marks it deprecated:true and standard_track:false.
* Push the “fixable flaws” button * Drop CSP plugin-types spec reference & deprecate w3c/webappsec-csp#394 completely removed the plugin-types directive from the CSP spec. So it’s now deprecated and no longer part of any current spec.
* Deprecate CSP plugin-types directive w3c/webappsec-csp@e9895ed (w3c/webappsec-csp#394) completely removed the plugin-types directive from the CSP spec. So this patch marks it deprecated:true and standard_track:false. * Remove Firefox bug link for CSP plugin-types
The HTTP Content-Security-Policy (CSP) plugin-types directive has been removed from the specification and is not supported by most browsers. Chrome browser suggests to specify "object-src 'none'" instead to block plugins, so replace it with that directive. Refer w3c/webappsec-csp#394 for details about this change. Tested: * In Chrome 99.0.4844.74, it no longer gives errors about CSP plugin-types directive. * Checked neiter <embed>, <object> or <applet> tags are used in eiter phosphor-webui or webui-vue. * Using webui-vue, KVM and SOL Console works. Change-Id: I79d7ed1de2c4d204bf040e7b32a7b6afe354862c Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
The HTTP Content-Security-Policy (CSP) plugin-types directive has been removed from the specification and is not supported by most browsers. Chrome browser suggests to specify "object-src 'none'" instead to block plugins, so replace it with that directive. Refer w3c/webappsec-csp#394 for details about this change. Tested: * In Chrome 99.0.4844.74, it no longer gives errors about CSP plugin-types directive. * Checked neiter <embed>, <object> or <applet> tags are used in eiter phosphor-webui or webui-vue. * Using webui-vue, KVM and SOL Console works. Change-Id: I79d7ed1de2c4d204bf040e7b32a7b6afe354862c Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
The HTTP Content-Security-Policy (CSP) plugin-types directive has been removed from the specification and is not supported by most browsers. Chrome browser suggests to specify "object-src 'none'" instead to block plugins, so replace it with that directive. Refer w3c/webappsec-csp#394 for details about this change. Tested: * In Chrome 99.0.4844.74, it no longer gives errors about CSP plugin-types directive. * Checked neiter <embed>, <object> or <applet> tags are used in eiter phosphor-webui or webui-vue. * Using webui-vue, KVM and SOL Console works. Change-Id: I79d7ed1de2c4d204bf040e7b32a7b6afe354862c Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com> Co-authored-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
This change removes the plugin-types directive and related algorithms. Cf. w3c/webappsec-csp#394 for background
The HTTP Content-Security-Policy (CSP) plugin-types directive has been removed from the specification and is not supported by most browsers. Chrome browser suggests to specify "object-src 'none'" instead to block plugins, so replace it with that directive. Refer w3c/webappsec-csp#394 for details about this change. Tested: * In Chrome 99.0.4844.74, it no longer gives errors about CSP plugin-types directive. * Checked neiter <embed>, <object> or <applet> tags are used in eiter phosphor-webui or webui-vue. * Using webui-vue, KVM and SOL Console works. Change-Id: I79d7ed1de2c4d204bf040e7b32a7b6afe354862c Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
* Push the “fixable flaws” button * Drop CSP plugin-types spec reference & deprecate w3c/webappsec-csp#394 completely removed the plugin-types directive from the CSP spec. So it’s now deprecated and no longer part of any current spec.
It's only implemented in Chrome and has the same vulnerability as typemustmatch, namely that it can be used for a cross-origin MIME type search. (There's also a number of processing model issues around the handling of MIME types, but they don't matter so much if it's removed.)
The text was updated successfully, but these errors were encountered: