Skip to content
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

[css-font-loading] unclear how CSP interacts with font loads #2113

Open
heycam opened this issue Dec 17, 2017 · 2 comments
Open

[css-font-loading] unclear how CSP interacts with font loads #2113

heycam opened this issue Dec 17, 2017 · 2 comments

Comments

@heycam
Copy link
Contributor

heycam commented Dec 17, 2017

I think we need to make clear that loads initiated by FontFace objects are affected by CSP font-src directives. The right way to do this is probably by using the Fetch algorithm in the spec.

We also need to clarify which window is used to perform the CSP check, when multiple windows are involved. For example, if a FontFace is created in an outer window, added to the FontFaceSet in an iframe, and then layout or a load() call on the FontFaceSet in that iframe's window happens, do we use the CSP directives from the outer window or the iframe? Using the Fetch algorithm would probably fix this too.

@heycam
Copy link
Contributor Author

heycam commented Dec 17, 2017

Chrome seems to use the CSP directives from the window that the FontFace was created in. Firefox currently uses the CSP directives from the window that triggers the FontFace load, but I plan to change to match Chrome.

@heycam
Copy link
Contributor Author

heycam commented Dec 17, 2017

Relatedly, which window we use as the initiator of the font load affects the referrer policy we should use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant