kglickman

Results 8 comments of kglickman

This is not just an issue with hot reloading. I have debugged this and the reason that it doesn't work is that injectStylesIntoStyleTag.js should set the nonce via `__webpack_require__.nc` like...

It does say that but usually you can get around that by adding hashes to the CSP. In this case, that doesn't work since there are an infinite number of...

Actually, I found that I was able to use hashes by creating hashes for all the combinations of the text-alignment and text-indent plugins since there weren't that many. However, I...

As an aside, I really don't understand why you don't just fix those plugins. If you set the styles using javascript syntax like: `element.style.backgroundColor` = "#FFFFFF", you don't have issues...

Just to let you know, ImageResize has the same problem without unsafe-inline.

UploadImage also has an issue when setting the aspect-ratio. Resizing tables also has a similar issue to resizing images.

What about the nonce solution? A lot of packages use that.

For examples of packages that allow for the passing of a nonce, see https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/content-security-policy.md and https://www.npmjs.com/package/react-to-print. We pass the nonce to them using `__webpack_nonce__`.