Use trusted mimetype

We shall not use untrusted mimetypes in this context
This commit is contained in:
Lukas Reschke 2015-06-22 15:30:27 +02:00
parent a88b370dc8
commit 3d2ac6dbb6
1 changed files with 1 additions and 1 deletions

View File

@ -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');