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/helper.php | |
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/helper.php')
-rw-r--r-- | lib/private/helper.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/helper.php b/lib/private/helper.php index da3d3cd1c6e..d5214823de9 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -431,6 +431,16 @@ class OC_Helper { } /** + * Get a secure mimetype that won't expose potential XSS. + * + * @param string $mimeType + * @return string + */ + static function getSecureMimeType($mimeType) { + return self::getMimetypeDetector()->getSecureMimeType($mimeType); + } + + /** * get the mimetype form a data string * * @param string $data |