From 3d2ac6dbb62252d251d2c10907f28eb3b8458836 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Mon, 22 Jun 2015 15:30:27 +0200 Subject: [PATCH] Use trusted mimetype We shall not use untrusted mimetypes in this context --- apps/files_versions/download.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_versions/download.php b/apps/files_versions/download.php index 72018ca68b..3cc324c230 100644 --- a/apps/files_versions/download.php +++ b/apps/files_versions/download.php @@ -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');