Application cannot run without unsafe-eval, which is a red flag #3764
Replies: 5 comments 1 reply
-
|
Lychee provides its own CSP headers. These do not include unsafe-eval. Lychee/config/secure-headers.php Line 715 in b2cb911 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Hmm... That does indeed seem to be the case... I'll hand over to @ildyria. |
Beta Was this translation helpful? Give feedback.
-
|
Nevermind - found it Lychee/app/Http/Middleware/DisableCSP.php Line 49 in b2cb911 |
Beta Was this translation helpful? Give feedback.
-
|
That's too bad because appart from that, Lychee's CSP is actually solid. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Lychee version
latest
Did you check the latest Lychee version?
Yes, I did
Which PHP version are you using?
PHP 8.3
Detailed description of the problem
If one uses a Content Security Policy, Lychee won't run and complains about
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'".Allowing unsafe-eval to the policy is a no-go as it's too dangerous.
Steps to reproduce the issue
No 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)
Beta Was this translation helpful? Give feedback.
All reactions