File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626
2727DEFAULT_CSP_POLICY = {
2828 'default-src' : '\' self\' ' ,
29+ 'object-src' : '\' none\' ' ,
2930}
3031
3132GOOGLE_CSP_POLICY = {
3940 # Used by generated code from http://www.google.com/fonts
4041 'style-src' : '\' self\' ajax.googleapis.com fonts.googleapis.com '
4142 '*.gstatic.com' ,
43+ 'object-src' : '\' none\' ' ,
4244 'default-src' : '\' self\' *.gstatic.com' ,
4345}
4446
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ def testDefaults(self):
5454 'max-age=31556926; includeSubDomains' ,
5555 'X-XSS-Protection' : '1; mode=block' ,
5656 'X-Content-Type-Options' : 'nosniff' ,
57- 'Content-Security-Policy' : 'default-src \' self\' ' ,
57+ 'Content-Security-Policy' : 'default-src \' self\' ; object-src \' none \' ' ,
5858 'Referrer-Policy' : 'strict-origin-when-cross-origin'
5959 }
6060
@@ -134,7 +134,7 @@ def testContentSecurityPolicyOptions(self):
134134 self .talisman .content_security_policy ['image-src' ] = '*'
135135 response = self .client .get ('/' , environ_overrides = HTTPS_ENVIRON )
136136 csp = response .headers ['Content-Security-Policy' ]
137- self .assertEqual (csp , "default-src 'self'; image-src *" )
137+ self .assertEqual (csp , "default-src 'self'; object-src \' none \' ; image-src *" )
138138
139139 self .talisman .content_security_policy ['image-src' ] = [
140140 '\' self\' ' ,
You can’t perform that action at this time.
0 commit comments