-
Notifications
You must be signed in to change notification settings - Fork 472
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 protobufjs breaks Content Security Policy because of eval usage #800
Comments
The usual fix for this is in a Webpack config (or similar):
I could have sworn that the SDK already included this fix, but apparently I'm misremembering. |
Just to circle back on this, this can still be reproduced in the latest version of mkdir tmp
cd tmp
npm init --yes
npm install [email protected] [email protected]
echo "import 'amazon-chime-sdk-js'" > src.js
npx webpack
grep eval dist/main.js # eval is in the bundle The |
This has been open for 4 years now... no urgency to fix this, from a security perspective? Can |
@richnew10 , or anyone else -- do you know how the string replacement "fix" can be implemented in Vite? |
It looks like there's a string replacement plugin for Vite: |
Describe the bug
Deploying the Chime SDK on a site that uses Content Security Policy (CSP) headers causes issues because of this protobufjs bug: protobufjs/protobuf.js#997
Chrome issues tab displays the following:
Someone references https://github.com/mapbox/pbf as an alternative in the cited issue. I hope an alternative can be found, as the bug is old and likely won't be fixed.
The text was updated successfully, but these errors were encountered: