-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Should Comply to Allow CSP policies (actually this forces the use of unsafe-inline) #1565
Comments
Thanks for the update @Kwaadpepper. Please go ahead with a PR. |
All right, I did some bugs fixing waiting this answer. |
I have something nearly ready. CSP policies, with this patch can be restrictive as
I have found easy solutions for inline CSS and JS while keeping the template system.
Should be allowed as local (see the csp policy upper). There is no way I think to bypass this for media elements (it would be a CSP bug otherwise). There is also no need to, since the client will display his own files to himself only. I think this restricts displaying blobs from I had some other toughs, should this be an But there could be added somewhere in the docs as small section about CSP although. I'll do some more tests and submit a PR soon. |
I just hurt myself to this bug https://bugzilla.mozilla.org/show_bug.cgi?id=1582115. The workaround issue seems to be
Seems to be kinda "fixed" in Firefox
|
Prerequisites
master
branch of bootstrap-fileinput.Steps to reproduce the issue
This is a general issue. It would be necessary to rework things.
There is no quick workaround as I see it.
It should use CSSOM ( $(element).css('prop', value))
https://stackoverflow.com/a/29089970/4355295
The actual system is a tree of templates to display things with a replace function to set values.
The solution would be loaded items with no style attr, and then set them using CSSOM.
I have identified 3 entries to fix there 👍
d-none
This last one need to be investigated.
I could try to propose a PR if this interests you, and if you are not planning a rewrite of this lib actually.
I crossed this issue working on my project.
These are relevant CSP HTTP headers I am using
The text was updated successfully, but these errors were encountered: