mirror of
https://github.com/nextcloud/server.git
synced 2026-07-14 12:21:50 -04:00
Merge pull request #17085 from owncloud/use-trusted-mimetype
Use trusted mimetype
This commit is contained in:
commit
a059b090c3
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue