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 copy buttons #3581

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Fix copy buttons #3581

merged 1 commit into from
Apr 11, 2024

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Apr 11, 2024

The CSP introduced recently prevents inline scripts. Copy buttons added an onclick attribute to buttons which is an inline script and was denied.

Refused to execute inline event handler because it violates the following Content Security Policy directive: "script-src 'self'". Either the 'unsafe-inline' keyword,

Fix by moving event to global click event and use event bubbling.

Microsoft Reviewers: Open in CodeFlow

@JamesNK
Copy link
Member Author

JamesNK commented Apr 11, 2024

/backport to release/8.0

Copy link
Contributor

Started backporting to release/8.0: https://github.com/dotnet/aspire/actions/runs/8640448246

@JamesNK JamesNK merged commit b844502 into main Apr 11, 2024
8 checks passed
@JamesNK JamesNK deleted the jamesnk/fix-copy-button branch April 11, 2024 03:07
@github-actions github-actions bot locked and limited conversation to collaborators May 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants