security - Style-src CSP Errors with JQuery and Modernizr -


when remove unsafe-inline script-src on csp headers multiple errors on modernizr 2.8.3 , error on jquery 2.1.3. it's strange because error on 1 of sites although using same libraries on others no csp issue.

error example:

refused apply inline style because violates following content security policy directive: "style-src 'self' *.github.com *.bootstrapcdn.com *.jsdelivr.net *.twitter.com *.googleapis.com *.google.com dmjwor2go9n1u.cloudfront.net". either 'unsafe-inline' keyword, hash ('sha256-cwe3bg0vyqoidnakbb_btdkhul49qzuwgncmpgny5zw='), or nonce ('nonce-...') required enable inline execution. 

i have hunch has part of script:

style = ['&#173;','<style id="s', mod, '">', rule, '</style>'].join(''); 

when click chrome console link me error placed around here:

<style id="s',v,'">',e,"</style>"].join(""),u.id=v,(l?u:d).innerhtml+=a,d.appendchild(u)

pretty lost why happening , can't seem find real direction in google searching. these errors firing how using these libraries? or insight appreciated.

so, sucks.

you not doing wrong, in order modernizr test if styles available, has inject styles page. via snippet included. blocked csp because not allowing things add css via javascript, doing.

i working on trying figure out way working (or @ least not crashing) in modernizr. in mean time, can add sha of modernizr file error includes inside of script-src , should ok.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

methods - python can't use function in submodule -

c# - ErrorThe type or namespace name 'AxWMPLib' could not be found (are you missing a using directive or an assembly reference?) -