Merge pull request #17085 from owncloud/use-trusted-mimetype
Use trusted mimetype
This commit is contained in:
commit
a059b090c3
|
@ -34,7 +34,7 @@ $versionName = '/'.$uid.'/files_versions/'.$filename.'.v'.$revision;
|
||||||
|
|
||||||
$view = new OC\Files\View('/');
|
$view = new OC\Files\View('/');
|
||||||
|
|
||||||
$ftype = $view->getMimeType('/'.$uid.'/files/'.$filename);
|
$ftype = \OC_Helper::getSecureMimeType($view->getMimeType('/'.$uid.'/files/'.$filename));
|
||||||
|
|
||||||
header('Content-Type:'.$ftype);
|
header('Content-Type:'.$ftype);
|
||||||
OCP\Response::setContentDispositionHeader(basename($filename), 'attachment');
|
OCP\Response::setContentDispositionHeader(basename($filename), 'attachment');
|
||||||
|
|
Loading…
Reference in New Issue