Skip to content
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

Security: flex-objects.js blocked because 'unsafe-eval' #133

Open
sebastianbaumann opened this issue Aug 17, 2021 · 3 comments
Open

Security: flex-objects.js blocked because 'unsafe-eval' #133

sebastianbaumann opened this issue Aug 17, 2021 · 3 comments
Assignees
Labels
enhancement Enhancement for an existing feature

Comments

@sebastianbaumann
Copy link

Hey guys,

we are running into an issue lately. We are developing a Grav website right now, which is more secured than any standard page. Due to our security policy we're getting following error, which prevents loading the pages panel in admin.

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the flex-objects.js:522

Bildschirmfoto 2021-08-17 um 14 43 56

Bildschirmfoto 2021-08-17 um 14 42 14

Any workaround/solution for this?
Thanks!

@mahagr
Copy link
Contributor

mahagr commented Aug 18, 2021

@w00fz Can you please check out why there's an eval in js?

@w00fz
Copy link
Member

w00fz commented Aug 18, 2021

That's how it gets minified by the UglifyJsPlugin in webpack when transpiling for production. I have to explore if there's other methods to get it minified without eval.

If you want to take a look and propose a PR that would be appreciated!

https://github.com/trilbymedia/grav-plugin-flex-objects/blob/develop/package.json#L9
https://github.com/trilbymedia/grav-plugin-flex-objects/blob/develop/webpack.conf.js#L21

@mahagr mahagr added the enhancement Enhancement for an existing feature label Aug 19, 2021
@bastian42
Copy link

Hello,
I am also interested in this and would be pleased to receive a solution.
Many thanks and best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement for an existing feature
Projects
None yet
Development

No branches or pull requests

4 participants