Skip to content
Snippets Groups Projects
Commit dc5f1596 authored by aydreeihn's avatar aydreeihn
Browse files

Merge remote-tracking branch 'aa/issue/attachment_downloads' into features_prs/develop-next

* aa/issue/attachment_downloads:
  Exclude Vulnerable Image Files
  Only allow image attachments to be opened in the browser window
parents a4a67245 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