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

Fixes Content-security-Policies bug #14846 #14854

Closed
wants to merge 1 commit into from

Conversation

Qui-mey
Copy link

@Qui-mey Qui-mey commented Feb 21, 2024

Changed innerHTML injection to textContent. innerHTML is not parsed as HTML, so it does not violate the CSP.

Fixes bug for issue: #14846
Suggested fix from: #12855

Changed innerHTML injection to textContent. innerHTML is not parsed as HTML, so it does not violate the CSP.

Suggested fix from: #12855
Copy link

vercel bot commented Feb 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
primeng ⬜️ Ignored (Inspect) Visit Preview Feb 21, 2024 1:36pm

@Qui-mey
Copy link
Author

Qui-mey commented Feb 22, 2024

This issue is more complex and requires more changes. The problem is that a style element is created and appended to the head of the document without a nonce. More components suffer from this issue. PrimeNG should be able to apply the nonce to all its components' dynamic style elements via a service of some sort. It should be made compatible with Angular 16's ngCspNonce.

@Qui-mey Qui-mey closed this Feb 22, 2024
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