Skip to content

Commit 1ac84a8

Browse files
authored
fix(module:upload): remove inline style to resolve CSP issue (#8064)
This commit addresses the CSP issue by removing the inline `style` property from the `input` element within the `nz-upload` component. The use of inline style attributes necessitates the inclusion of `unsafe-inline`.
1 parent f1a4050 commit 1ac84a8

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<!--
2+
We explicitly bind `style.display` to avoid using an inline style
3+
attribute property (which is not allowed when CSP `unsafe-inline`
4+
is not specified).
5+
-->
16
<input
27
type="file"
38
#file
@@ -6,6 +11,6 @@
611
[attr.directory]="options.directory ? 'directory' : null"
712
[attr.webkitdirectory]="options.directory ? 'webkitdirectory' : null"
813
[multiple]="options.multiple"
9-
style="display: none"
14+
[style.display]="'none'"
1015
/>
1116
<ng-content></ng-content>

0 commit comments

Comments
 (0)