Skip to content

Update styletag injection to use <style> for platforms other than firefox #508

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

Merged
merged 5 commits into from
May 11, 2023

Conversation

dharb
Copy link
Contributor

@dharb dharb commented May 11, 2023

In order to bypass style-src CSP restrictions in Firefox, we use a link element. However this creates a CSP issue on other platforms on websites that have style-src 'unsafe-inline' in their CSP, which is relatively common: we're not able to inject a link element. This PR updates our injection technique to only use link elements in Firefox, and normal style elements elsewhere.

Co-authored-by: Jonathan Kingston <[email protected]>
@dharb dharb merged commit ec91238 into main May 11, 2023
@dharb dharb deleted the dharb/platform-styletags branch May 11, 2023 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants