summaryrefslogtreecommitdiffstats
path: root/lib/private/preview/svg.php
diff options
context:
space:
mode:
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) {