@@ -122,18 +122,24 @@ protected void configure(HttpSecurity http) throws Exception {
122
122
"default-src 'none'; "
123
123
// 'self' is required for: our own CSS files
124
124
// 'https://cdn.rawgit.com' is required for: languages.min.css (TODO: GH #246)
125
+ // 'https://www.gstatic.com' is required for: Google Charts on collection page.
125
126
// 'sha256-Dpm...' is required for: 'box-shadow: none; border: 0px;' inline CSS
126
127
// that are using on /series/add and /series/{id} pages.
127
- + "style-src 'self' https://cdn.rawgit.com "
128
- + "'sha256-DpmxvnMJIlwkpmmAANZYNzmyfnX2PQCBDO4CB2BFjzU='; "
128
+ // 'sha256-/kX...' is required for: 'overflow: hidden;' inline CSS that is using
129
+ // bg Google Charts on collection page.
130
+ + "style-src 'self' https://cdn.rawgit.com https://www.gstatic.com "
131
+ + "'sha256-DpmxvnMJIlwkpmmAANZYNzmyfnX2PQCBDO4CB2BFjzU=' "
132
+ + "'sha256-/kXZODfqoc2myS1eI6wr0HH8lUt+vRhW8H/oL+YJcMg='; "
129
133
// 'self' is required for: our own JS files
130
134
// 'unsafe-inline' is required for: jquery.min.js (that is using code inside of
131
135
// event handlers. We can't use hashing algorithms because they aren't supported
132
136
// for handlers. In future, we should get rid of jQuery or use
133
137
// 'unsafe-hashed-attributes' from CSP3. Details:
134
138
// https://github.com/jquery/jquery/blob/d71f6a53927ad02d/jquery.js#L1441-L1447
135
139
// and https://w3c.github.io/webappsec-csp/#unsafe-hashed-attributes-usage)
136
- + "script-src 'self' 'unsafe-inline'; "
140
+ // 'unsafe-eval' is required for: loader.js (for Google Charts)
141
+ // 'https://www.gstatic.com' is required for: Google Charts on collection page.
142
+ + "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.gstatic.com; "
137
143
// 'self' is required for: AJAX requests from our scripts (country suggestions)
138
144
+ "connect-src 'self'; "
139
145
// 'self' is required for: uploaded images and its previews
0 commit comments