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

CSP issues with file field #30

Open
bryan-brancotte opened this issue Sep 17, 2024 · 1 comment · May be fixed by #29
Open

CSP issues with file field #30

bryan-brancotte opened this issue Sep 17, 2024 · 1 comment · May be fixed by #29

Comments

@bryan-brancotte
Copy link
Member

Hi all

The CSP compatibility have already been investigated for bootstrap 5, and I was wondering if we could also do it for bootstrap 4, I stumbled upon this compatibility issue some weeks ago.

Following bootstrap doc by using bs-custom-file-input plugin I was able to remove the script tag (cf #29) and thus make the file field compatible with CSP. My question is whether we should or not remove the script tag as it is a breaking change, all current setup of crispy with custome-file-input and without the plugin will not work visually not work anymore. In a setup with bootstrap 4.3, even with the plugin, the file chosen was not rendered, I had to update to 4.6. Would mentioning in the doc that we have to use boostrap 4.6 and bs-custom-file-input or an equivalent is enough ?

P.S: by csp compatible, I mean without using unsafe-inline

@bryan-brancotte bryan-brancotte linked a pull request Sep 17, 2024 that will close this issue
@bryan-brancotte
Copy link
Member Author

P.S: I'll work on fixing the test if we go in the direction of removing the script tag

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 a pull request may close this issue.

1 participant