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

Use of eval violates Content Security Policy in browsers #128

Open
ekilah opened this issue Feb 26, 2019 · 7 comments
Open

Use of eval violates Content Security Policy in browsers #128

ekilah opened this issue Feb 26, 2019 · 7 comments

Comments

@ekilah
Copy link

ekilah commented Feb 26, 2019

Hi,

I'm posting this issue as an indirect user of the product of your library, so sorry for any misunderstandings about how things work on my end.

Long story short, eval is a somewhat contentious function in browser-land, and often a Content Security Policy for a website will prevent its use to avoid accidentally leaving any attack vectors open for running user-generated code.

I was looking to use React PDF, a popular library to render a PDF in a React app, which uses several dependencies to accomplish that task. One of its dependencies is Yoga, a cross-platform rendering engine that uses this project.

Ok, so that's how I got here. The issue with react-pdf is summarized well in my issue there: diegomura/react-pdf#510 . The owner of that repo suggested at least trying to start a conversation here.

I'm making this issue here to ask if it's at all possible for this project to not use eval. I ask that with some hesitation, because I have a feeling it's fairly core to the functionality here, but it is worth asking. I know that this project is fairly far away from browser interaction in terms of intended scope, and on top of that it is working to bridge C++ and JS, so the answer may very likely be "no," but here I am 😄

@AgarwalShyam
Copy link

Hi Team,

We have also used the same @react-pdf/renderer package but getting the CSP issue in the chrome browser, is anybody has any update on this or any workaround?

Thanks & Regards,
Shyam Agarwal

@sezny
Copy link

sezny commented Nov 23, 2021

Any updates ?

@MatanYemini
Copy link

Any updates on this?

@seanquinn
Copy link

Also curious on this?

@jepek
Copy link

jepek commented Aug 9, 2022

Would be great to fix this.

@Haraldson
Copy link

I think this issue at least deserves a response from the maintainers? Even if it’s a ‘no, we‘re not gonna spend time looking into that’?

@w90
Copy link

w90 commented Sep 29, 2022

Would be great to fix this, +1

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

No branches or pull requests

8 participants