Mercurial > p > roundup > code
diff roundup/cgi/client.py @ 7159:765222ef4cec
- issue2551257: add 'X-Content-Type-Options: nosniff' header for file download
when downloading an attached (user supplied file), make sure that an
'X-Content-Type-Options: nosniff' header is sent.
Added test for header as well.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 23 Feb 2023 16:20:32 -0500 |
| parents | 89a59e46b3af |
| children | 07ce4e4110f5 |
line wrap: on
line diff
--- a/roundup/cgi/client.py Thu Feb 23 16:02:51 2023 -0500 +++ b/roundup/cgi/client.py Thu Feb 23 16:20:32 2023 -0500 @@ -846,7 +846,7 @@ # exception handlers. self.determine_language() self.db.i18n = self.translator - + self.setHeader("X-Content-Type-Options", "nosniff") self.serve_file(designator) except SendStaticFile as file: self.serve_static_file(str(file))
