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

Bug: Does not pass strict content security policy #1027

Open
claytoncollie opened this issue Aug 8, 2024 · 0 comments
Open

Bug: Does not pass strict content security policy #1027

claytoncollie opened this issue Aug 8, 2024 · 0 comments

Comments

@claytoncollie
Copy link

When a strict Content Security Policy is implemented without unsafe-inline and unsafe-eval for scripts and styles, the CaGov plugin is not able to load the following items due to how they are written to the page markup. In these cases, the CSS and HTML are loaded from inside a javascript file instead of enqueued/echoed with WordPress functions. For the CSS listed below, this goes all the way into the Design System packages that are imported into the WordPress plugin.

CSS

accordions
feedback
pagination

HTML

build/index.js as related to the PDF link icon web component. This HTML should not be written to the DOM during processing and not after script are loaded.

https://github.com/cagov/ca-design-system-gutenberg-blocks/blob/3fa11a492b836db411f82fffae56357c15bcf5a3/design-system-proposals/js/custom.js#L30

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

No branches or pull requests

1 participant