diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2014-04-14 17:17:50 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2014-04-14 17:17:50 +0200 |
commit | 51e47319ef2ab37d458dc96ba33a26bb851102be (patch) | |
tree | b23ba6f4a4359a21db51dd9ae36d0def39c07209 /lib/private/connector | |
parent | 71de32186936c4afc2e48a566c2d3c6f3fdf365b (diff) | |
download | nextcloud-server-51e47319ef2ab37d458dc96ba33a26bb851102be.tar.gz nextcloud-server-51e47319ef2ab37d458dc96ba33a26bb851102be.zip |
White-list known secure mime types. Refs. #8184
Diffstat (limited to 'lib/private/connector')
-rw-r--r-- | lib/private/connector/sabre/file.php | 6 |
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); } |