summaryrefslogtreecommitdiffstats
path: root/lib/private/preview/svg.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-09-19 13:35:21 +0200
committerLukas Reschke <lukas@owncloud.com>2014-09-22 16:09:08 +0200
commitca3447fcdea878ade24caed4ad300697fc132d08 (patch)
tree2749ec20587207a007ac35e76d5d1d48712b5606 /lib/private/preview/svg.php
parent831d34f084e4c2f6b13303f58e12a9f96eb10a74 (diff)
downloadnextcloud-server-ca3447fcdea878ade24caed4ad300697fc132d08.tar.gz
nextcloud-server-ca3447fcdea878ade24caed4ad300697fc132d08.zip
Add a configuration switch for enabled preview mimetypes
Diffstat (limited to 'lib/private/preview/svg.php')
-rw-r--r--lib/private/preview/svg.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/preview/svg.php b/lib/private/preview/svg.php
index 82ef3cdebf6..0b5dbc9716f 100644
--- a/lib/private/preview/svg.php
+++ b/lib/private/preview/svg.php
@@ -31,6 +31,11 @@ if (extension_loaded('imagick')) {
$content = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' . $content;
}
+ // Do not parse SVG files with references
+ if(stripos($content, 'xlink:href') !== false) {
+ return false;
+ }
+
$svg->readImageBlob($content);
$svg->setImageFormat('png32');
} catch (\Exception $e) {