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(module:upload): remove inline style to resolve CSP issue #8064

Merged
merged 1 commit into from Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion components/upload/upload-btn.component.html
@@ -1,3 +1,8 @@
<!--
We explicitly bind `style.display` to avoid using an inline style
attribute property (which is not allowed when CSP `unsafe-inline`
is not specified).
-->
<input
type="file"
#file
Expand All @@ -6,6 +11,6 @@
[attr.directory]="options.directory ? 'directory' : null"
[attr.webkitdirectory]="options.directory ? 'webkitdirectory' : null"
[multiple]="options.multiple"
style="display: none"
[style.display]="'none'"
/>
<ng-content></ng-content>