MDL-32889 lib: escape filename in Content-Disposition header

This commit is contained in:
Charles Fulton
2012-05-09 16:03:33 -04:00
parent e16e2300c5
commit 66969d5004
6 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -1801,7 +1801,7 @@ function send_temp_file($path, $filename, $pathisstring=false) {
$filename = urlencode($filename);
}
header('Content-Disposition: attachment; filename='.$filename);
header('Content-Disposition: attachment; filename="'.$filename.'"');
if (strpos($CFG->wwwroot, 'https://') === 0) { //https sites - watch out for IE! KB812935 and KB316431
header('Cache-Control: max-age=10');
header('Expires: '. gmdate('D, d M Y H:i:s', 0) .' GMT');