Skip to content
Snippets Groups Projects
Commit 4c79ff83 authored by JediKev's avatar JediKev
Browse files

Merge branch 'aydreeihn/issue/attachment_downloads' into release/v1.10.2

* aydreeihn/issue/attachment_downloads:
  Exclude Vulnerable Image Files
  Only allow image attachments to be opened in the browser window
parents 9dd91835 4f408b8f
No related branches found
No related tags found
No related merge requests found
......@@ -106,6 +106,9 @@ class Http {
}
function download($filename, $type, $data=null, $disposition='attachment') {
if (strpos($type, 'image/') !== 0 || preg_match('/image\/.*\+.*/', $type))
$disposition='attachment';
header('Pragma: private');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: private', false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment