Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2014-04-14 19:17:50 +0400
committerThomas Tanghus <thomas@tanghus.net>2014-04-14 19:17:50 +0400
commit51e47319ef2ab37d458dc96ba33a26bb851102be (patch)
treeb23ba6f4a4359a21db51dd9ae36d0def39c07209 /lib/private/connector
parent71de32186936c4afc2e48a566c2d3c6f3fdf365b (diff)
White-list known secure mime types. Refs. #8184
Diffstat (limited to 'lib/private/connector')
-rw-r--r--lib/private/connector/sabre/file.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index ef6caaf22a7..750d646a8f5 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -205,10 +205,12 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
*/
public function getContentType() {
if (isset($this->fileinfo_cache['mimetype'])) {
- return $this->fileinfo_cache['mimetype'];
+ $mimeType = $this->fileinfo_cache['mimetype'];
+ } else {
+ $mimeType = \OC\Files\Filesystem::getMimeType($this->path);
}
- return \OC\Files\Filesystem::getMimeType($this->path);
+ return \OC_Helper::getSecureMimeType($mimeType);
}