-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Replace use of eval() #9024
Comments
This is in third-party code (requirejs) but after a quick look at the code, I'm pretty sure this code is never used in Cesium, so you could try commenting it out or removing it. |
When I ran cesium, it did go through the line mentioned above, but this was a while ago. I did not know this was third-party code though, so there is no way to remove it on cesium end? |
I don't think this is something we plan on changing at the moment, this is just part of how RequireJS works. I would recommend adding an exception to allow this use eval when running CesiumJS. |
Is it possible that use of |
@candrews Not as a side effect. The main problem here is that (at least last time I looked) Web Workers do not support loading ES6 modules directly and you need to use an old school browser module system (like amd/requirejs) which is why this code exists. However it's probably worth looking into if that has a better alternative now. I'll add a note to the linked issue for us to take a look. Thanks for the reminder! |
Has there been any update on this issue? We are trying to use Cesium in our application but we are required to not include 'unsafe-eval' in our CSP. Simply having Cesium load in through webpack runs into this issue. |
@alexfrigault No updates yet. We are potentially taking a look at eliminating requireJS and therefore |
@ggetz any updates on this one? :) |
@pixelschubs Not yet. I would recommend keeping an eye on #9473. We'll post any updates there. |
Hi, the most recent blocker for replacing requireJS in our packaged web workers was that Firefox did not support ESM modules in workers. The good news is that issue was recently marked as resolved! I'll re-open this issue to track updating our build system to remove RequireJS. |
We are using CSP headers and ran into an issue using this library because of the use of unsafe eval.
cesium/Source/Workers/cesiumWorkerBootstrapper.js
Line 2285 in 2fd0e8f
I am wondering if there is an alternative for this?
The text was updated successfully, but these errors were encountered: