-
Notifications
You must be signed in to change notification settings - Fork 30
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
Cross-origin content #63
Comments
These comments are not referring to loading of cross-origin content via the That said, it's probably good to be explicit in the explainer about whether loading of cross-origin content is allowed by default or requires CORS. |
Agreed. Would using the This document should probably also address what happens if the model data itself references cross-origin content. e.g. a texture used for a material is loaded from somewhere other than the source of the model file. Maybe the easiest thing to do for now is disallow such references? |
I think the simpler and more modern approach would be to just require the content be exposed with CORS. (I.e., use mode "cors" instead of mode "no-cors".) Then you can never taint a canvas with these things:
This would be equivalent to fetching such items with mode of "same-origin". I think it would also be relatively easy to just load with mode "cors", which would let them reference public textures and such. |
Thanks for the explanation. |
This might be temporary while investigating #63, where there is an alternate suggestion.
Closing as this is immersive-web/model-element#56 |
Hi, great to see the explainer for the model element! It seems pretty cool and most of the design decisions make sense to me.
One thing I noticed was recurring text such as
or
which seem to imply that
<model>
might be aiming for the legacy security model used by things like<img>
, where you can display cross-origin data (even without CORS enabled for the resource).Given Spectre, and even before then the move towards ensuring the same-origin policy is respected, this seems like a bad idea for new resource-inclusion technologies. All recent resource-inclusion technologies such as CSS fonts or JS modules, have instead relied on CORS.
So, I'm hoping that
<model>
can do the same, and require CORS for cross-origin data.(Another related modern security practice is to require correct
Content-Type
headers and not use MIME sniffing; that might be too much detail for the explainer though.)The text was updated successfully, but these errors were encountered: