Application cannot run without unsafe-eval, which is a red flag #3764
Lychee versionlatest Did you check the latest Lychee version?Yes, I did Which PHP version are you using?PHP 8.3 Detailed description of the problemIf one uses a Content Security Policy, Lychee won't run and complains about Allowing unsafe-eval to the policy is a no-go as it's too dangerous. Steps to reproduce the issueNo response Diagnostics [REQUIRED]Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'". Browser & System [REQUIRED]Any Please confirm (incomplete submissions will not be addressed)
|
Replies: 5 comments 2 replies
|
Lychee provides its own CSP headers. These do not include unsafe-eval. Lychee/config/secure-headers.php Line 715 in b2cb911 |
|
Hmm... That does indeed seem to be the case... I'll hand over to @ildyria. |
|
Nevermind - found it Lychee/app/Http/Middleware/DisableCSP.php Line 49 in b2cb911 |
|
That's too bad because appart from that, Lychee's CSP is actually solid. |

Fixed 13e96a6