-
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
CSP3: Consider adding a 'clone-src' directive #199
Comments
If the difference between implementation techniques is actually observable, this is something SVG needs to fix first. |
I don't actually understand the request. :) Is there an example I could look at? |
This is a spin-off of https://bugzilla.mozilla.org/show_bug.cgi?id=1303364 in which the example is Firefox governs this via |
There should be nothing governed by |
Yeah. That's why there's a bug. |
👍 got it |
What are the capabilities of |
I'd have thought the If that second SVG contains JavaScript, that should be restricted by This is how it works with https://www.w3.org/TR/SVG11/struct.html#UseElement index.php
rect.svg
In Firefox 52 only the In Chrome 57, both rectangles are shown. |
I ended up here after running into an SVG CSP issue in Firefox. The Unlike an SVG 2 seems to have dropped the SVG 1.1 restriction on the referenced element being an enumerated list of potential SVG elements (implicitly indicating that it can potentially reference any element in any namespace given browser support) and specifically allows the indirect reference of HTML
Also, |
This issue is kind of important if we want move forward with SVG sprites and seems that at 3 years of his creation there isn't done any progress, is there something we can help with? Does Firefox needs to change the CSP validation or does the Spec needs to be change? Thanks for your work. |
…are not displayed The issue happens for two reasons: * since the v5.0 of file-loader everything is considered to be usable as a ES module by default. This does not work in this situation. * SVG loaded through `<use>` is a bit of grey area in the Content-Security-Policy specification [0][1] and a result it does not work on Firefox when `default-src` is set to none. In order to solve the issue while keeping the overall app not too big, the parts of the SVG have been splitted into individual components and are loaded asynchronously. The opportunity has also been taken to optimize the SVGs with SVGO [2]. [0] w3c/webappsec-csp#199 [1] w3c/webappsec-csp#198 [2] https://github.com/svg/svgo Change-Id: Ia66419a50e73eadaffdd31bf3b1b70a5328592d3
I have discovered this problem for myself today and I must say it's frustrating to find five year old discussions of an issue and no progress on it. |
Yeah, definitely surprising, specially because the mozilla observatory now recommends setting the CSP |
Linking the Firefox issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1773976. |
SVG has a element which is supposed to reference some other markup and have the document act as if the was replaced by that markup. In Firefox, is implemented by cloning the referenced content into the , whereas in other UAs I believe they redirect rendering off to the original content (with some on-the-fly restyling to inherit style in from the ) without cloning. The 'img-src' and 'frame-src' directives are not appropriate (at least in the case of Firefox) since the linked content will end up inline in the referencing document.
The text was updated successfully, but these errors were encountered: