Use trusted mimetype
We shall not use untrusted mimetypes in this context
This commit is contained in:
parent
a88b370dc8
commit
3d2ac6dbb6
|
@ -34,7 +34,7 @@ $versionName = '/'.$uid.'/files_versions/'.$filename.'.v'.$revision;
|
|||
|
||||
$view = new OC\Files\View('/');
|
||||
|
||||
$ftype = $view->getMimeType('/'.$uid.'/files/'.$filename);
|
||||
$ftype = \OC_Helper::getSecureMimeType($view->getMimeType('/'.$uid.'/files/'.$filename));
|
||||
|
||||
header('Content-Type:'.$ftype);
|
||||
OCP\Response::setContentDispositionHeader(basename($filename), 'attachment');
|
||||
|
|
Loading…
Reference in New Issue