Re: [svgwg] Referencing SVGs through USE from other domains (#707)

The SVG Working Group just discussed `Referencing SVGs through USE from other domains`, and agreed to the following:

* `RESOLUTION: Add cross-origin attribute to the <use> element in a current or future spec`
* `RESOLVED: Add cross-origin attribute to the <use> element in a current or future spec`
* `RESOLVED: Add the cross-origin attribute to the <use> element to SVG 2, and mark it at-risk`
* `RESOLVED: Request implementation feedback about the cross-origin attribute to the <use> attribute`

<details><summary>The full IRC log of that discussion</summary>
&lt;myles> Topic: Referencing SVGs through USE from other domains<br>
&lt;myles> GitHub: https://github.com/w3c/svgwg/issues/707<br>
&lt;myles> AmeliaBR: Should we add a cross origin attribute to the use element.<br>
&lt;myles> AmeliaBR: Right now, none of the browsers support &lt;use> references to cross-origin files. But they do support it to the same origin.<br>
&lt;myles> AmeliaBR: When SVG introduced the cross-origin attribute for &lt;image> and &lt;script>, it was added to &lt;use> but it got pulled back because it was unclear how it would work with shadow dom, and how that would affect cross-origin. I think that is cleared up now. The way we agreed that &lt;use> should be a closed shadow dom where you can't access the internals<br>
&lt;myles> krit: I don't think we have consensus on that<br>
&lt;myles> AmeliaBR: I thought we agreed? I can dig up the issue<br>
&lt;AmeliaBR> https://github.com/w3c/svgwg/issues/363<br>
&lt;myles> AmeliaBR: Everyone agrees.<br>
&lt;myles> AmeliaBR: But! Neither of those really make a difference. All those complications would be the same. The use case brought up in this new issue makes a good point, that because cross-origin &lt;use> isn't supported, the workaround that authors have to use is to fetch the cross-origin file with script, and then inject the markup directly in their page, because this is less-secure than &lt;use> cross references, we say things like "don't run scripts"<br>
&lt;myles> krit: But if there is a less-secure method, then providing a more-secure method isn't necessarily a win for the users<br>
&lt;myles> AmeliaBR: There are two risks. 1) Allowing the current webpage access to the content from the other domain, but I'm not suggesting that we should allow free origin; it should be based on CORS<br>
&lt;myles> AmeliaBR: This is security for the webpage author when you're referencing a 3rd party domain, where the content on that 3rd party domain might change.<br>
&lt;myles> AmeliaBR: We get a little bit of extra security if the page author opts into it. Like CSP.<br>
&lt;myles> AmeliaBR: Also, it's easier for the author (less lines of code)<br>
&lt;myles> krit: We already define cross-origin attribute for other elements. Specification-wise, it wouldn't be a big deal to add it. Do you think implementations would implement it? Or should we move it to SVG 2.1.<br>
&lt;myles> AmeliaBR: I'd like to resolve that we'd like to add this, but then ask implementors whether they think it can come in the short term or whether it should be delayed<br>
&lt;myles> krit: Any concerns for adding the cross-origin attribute to &lt;use>?<br>
&lt;myles> &lt;silence><br>
&lt;myles> RESOLUTION: Add cross-origin attribute to the &lt;use> element in a current or future spec<br>
&lt;myles> RESOLVED: Add cross-origin attribute to the &lt;use> element in a current or future spec<br>
&lt;myles> krit: Since we resolved on that part, we can at least have a note with our intentions into SVG 2.<br>
&lt;myles> AmeliaBR: Sure. We can add a note and open issue, requesting implementor issue<br>
&lt;myles> krit: That's part two. For now, let's resolve on a note.<br>
&lt;myles> &lt;some general discussion about the merits of a note vs normative text><br>
&lt;myles> AmeliaBR: We should start the request for feedback right away, on the issue therad.<br>
&lt;myles> *thread<br>
&lt;myles> RESOLVED: Add the cross-origin attribute to the &lt;use> element to SVG 2, and mark it at-risk<br>
&lt;myles> RESOLVED: Request implementation feedback about the cross-origin attribute to the &lt;use> attribute<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/707#issuecomment-511563129 using your GitHub account

Received on Monday, 15 July 2019 20:45:56 UTC