Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
60fc38f8
Commit
60fc38f8
authored
Jul 10, 2015
by
Aaron Wells
Committed by
Gerrit Code Review
Jul 10, 2015
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Use nosniff header to prevent potential XSS via untrusted files in IE" into 1.9_STABLE
parents
120c9379
7b9b434b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
htdocs/lib/file.php
htdocs/lib/file.php
+1
-0
No files found.
htdocs/lib/file.php
View file @
60fc38f8
...
@@ -89,6 +89,7 @@ function serve_file($path, $filename, $mimetype, $options=array()) {
...
@@ -89,6 +89,7 @@ function serve_file($path, $filename, $mimetype, $options=array()) {
else
{
else
{
header
(
'Content-Disposition: inline; filename="'
.
$filename
.
'"'
);
header
(
'Content-Disposition: inline; filename="'
.
$filename
.
'"'
);
}
}
header
(
'X-Content-Type-Options: nosniff'
);
if
(
$options
[
'lifetime'
]
>
0
&&
!
get_config
(
'nocache'
))
{
if
(
$options
[
'lifetime'
]
>
0
&&
!
get_config
(
'nocache'
))
{
header
(
'Cache-Control: max-age='
.
$options
[
'lifetime'
]);
header
(
'Cache-Control: max-age='
.
$options
[
'lifetime'
]);
...
...
Write
Preview
Markdown
is supported
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