aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2020-03-01 00:34:28 +0100
committerDaniel Kesselberg <mail@danielkesselberg.de>2020-03-01 21:19:07 +0100
commite35b76a12b3f5a580fafb0cf408e868d45908bc5 (patch)
tree6dcba553d975e7ddbfa155561c65e56e6ede83e4 /apps/theming
parent72cc8270cdd0f1c95ef1708be81cf4ac424dca47 (diff)
downloadnextcloud-server-e35b76a12b3f5a580fafb0cf408e868d45908bc5.tar.gz
nextcloud-server-e35b76a12b3f5a580fafb0cf408e868d45908bc5.zip
Don't try to resize a svg uploaded as background image.
image* are gd functions without support for svg hence we are not able to resize svg. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'apps/theming')
-rw-r--r--apps/theming/lib/Controller/ThemingController.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php
index b7e878f2e7e..d043c64f853 100644
--- a/apps/theming/lib/Controller/ThemingController.php
+++ b/apps/theming/lib/Controller/ThemingController.php
@@ -280,8 +280,7 @@ class ThemingController extends Controller {
);
}
- $resizeKeys = ['background'];
- if (in_array($key, $resizeKeys, true)) {
+ if ($key === 'background' && strpos($detectedMimeType, 'image/svg') === false) {
// Optimize the image since some people may upload images that will be
// either to big or are not progressive rendering.
$newImage = @imagecreatefromstring(file_get_contents($image['tmp_name'], 'r'));