filestack-js icon indicating copy to clipboard operation
filestack-js copied to clipboard

Triggers CSP violations if unsafe-eval is not used

Open sorin-davidoi opened this issue 5 years ago • 5 comments

Using the script-src directive without 'unsafe-eval' results in a violation:

Content Security Policy: The page's settings blocked the loading of a resource at eval ("script-src").

This is caused by the following line in http://static.filestackapi.com/filestack-js/3.17.0/filestack.min.js:

try{i=i||new Function("return this")()}catch(t)

While this doesn't seem to affect the functionality of the library, if one uses the report-uri directive it will result in useless HTTP requests being made.

sorin-davidoi avatar Sep 28 '20 09:09 sorin-davidoi

This is affecting us in production too. Is there any way to disable this unsafe-eval call?

Cherry avatar Jul 20 '21 15:07 Cherry

Hello, same here !

kYann avatar Jan 13 '22 17:01 kYann