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

Fix CSP failures in FastBoot tests #1217

Merged
merged 1 commit into from
Sep 1, 2020
Merged

Fix CSP failures in FastBoot tests #1217

merged 1 commit into from
Sep 1, 2020

Conversation

simonihmig
Copy link
Contributor

This was caused by several facts:

This adds hash values to our CSP policy to specifically allow these two inline style elements

This was caused by several facts:
* `ember-a11y-testing` adds two styles tags with inline content
* `ember-cli-fastboot-testing` parses the FastBoot rendered HTML string here: https://github.com/embermap/ember-cli-fastboot-testing/blob/47882cebaaf9fb482df3e3b1eae1067807726890/addon-test-support/index.js#L120
* while the inline style violating our CSP was somehow ignored before, it seems the latest Chrome 85 now triggers a CSP violation event on that line above
* which in turn makes the test fail

This adds hash values to our CSP policy to specifically allow these two inline style elements
@simonihmig simonihmig merged commit 8878032 into master Sep 1, 2020
@simonihmig simonihmig deleted the fix-csp branch September 1, 2020 21:59
@jelhan
Copy link
Contributor

jelhan commented Sep 2, 2020

Thanks a lot for fixing this one.

We are planning to add a feature to ember-cli-content-security-policy to support these cases with zero config: adopted-ember-addons/ember-cli-content-security-policy#149

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

Successfully merging this pull request may close these issues.

2 participants