Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
209b78f1
Commit
209b78f1
authored
Jul 10, 2015
by
Aaron Wells
Committed by
Gerrit Code Review
Jul 10, 2015
Browse files
Merge "Use nosniff header to prevent potential XSS via untrusted files in IE"
parents
af95a779
96b117e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/file.php
View file @
209b78f1
...
...
@@ -89,6 +89,7 @@ function serve_file($path, $filename, $mimetype, $options=array()) {
else
{
header
(
'Content-Disposition: inline; filename="'
.
$filename
.
'"'
);
}
header
(
'X-Content-Type-Options: nosniff'
);
if
(
$options
[
'lifetime'
]
>
0
&&
!
get_config
(
'nocache'
))
{
header
(
'Cache-Control: max-age='
.
$options
[
'lifetime'
]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment