File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 7070 security issue with rest when using '*'.
7171- issue2551263: In REST response expose rate limiting, sunset, allow
7272 HTTP headers to calling javascript.
73+ - issue2551257: When downloading an attached (user supplied file),
74+ make sure that an 'X-Content-Type-Options: nosniff' header is sent.
7375
7476Features:
7577
Original file line number Diff line number Diff line change @@ -846,7 +846,7 @@ def inner_main(self):
846846 # exception handlers.
847847 self .determine_language ()
848848 self .db .i18n = self .translator
849-
849+ self . setHeader ( "X-Content-Type-Options" , "nosniff" )
850850 self .serve_file (designator )
851851 except SendStaticFile as file :
852852 self .serve_static_file (str (file ))
Original file line number Diff line number Diff line change @@ -1197,6 +1197,7 @@ def test_new_issue_with_file_upload(self):
11971197 # download file and verify content
11981198 f = session .get (self .url_base ()+ '/file%(file)s/text1.txt' % m .groupdict ())
11991199 self .assertEqual (f .text , file_content )
1200+ self .assertEqual (f .headers ["X-Content-Type-Options" ], "nosniff" )
12001201 print (f .text )
12011202
12021203 def test_new_file_via_rest (self ):
You can’t perform that action at this time.
0 commit comments