-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add CSP nonce to CSS as well #16580
Add CSP nonce to CSS as well #16580
Conversation
Signed-off-by: Roeland Jago Douma <[email protected]>
Signed-off-by: Roeland Jago Douma <[email protected]>
Signed-off-by: Roeland Jago Douma <[email protected]>
@@ -22,6 +22,8 @@ | |||
import Vue from 'vue'; | |||
import queryString from 'query-string'; | |||
|
|||
__webpack_nonce__ = btoa(OC.requestToken) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@juliushaertl @skjnldsv I assumed this was enough as we use it in other places as well... but it seems not...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok got it. it is because of the import reshuffling.... so the nonce gets set to late
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stupid wrapping seems to be the easy fix...
Signed-off-by: Roeland Jago Douma <[email protected]>
|
||
import Vue from 'vue'; | ||
import queryString from 'query-string'; | ||
|
||
__webpack_nonce__ = btoa(OC.requestToken) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import OC from './OC/index'
?
Ok nevermind. We are by far not ready for this. As it doesn't allow setting
|
Further tightening of our CSP.
It seems we need to export the nonce now to all the webpack code that wants to inject CSS (not just chunks).