[BUGFIX] Detection of image manipulation libs with open_basedir 22/29822/5
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 3 May 2014 19:28:13 +0000 (21:28 +0200)
committerXavier Perseguers <xavier@typo3.org>
Sun, 4 May 2014 07:12:49 +0000 (09:12 +0200)
If open_basedir is restricted to files, eg. /usr/bin/gm, detection
fails in install tool. The additional is_dir() check may fail then.
The patch removes it since @is_file() covers the same checks.

Resolves: #58466
Releases: 6.2
Change-Id: I5ab6a36ccd3d283a1dc1e672f7deddc2f0ea37c4
Reviewed-on: https://review.typo3.org/29822
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
typo3/sysext/install/Classes/Configuration/Image/GraphicsMagickPreset.php
typo3/sysext/install/Classes/Configuration/Image/ImageMagick6Preset.php

index 57a2885..45c3822 100644 (file)
@@ -80,7 +80,7 @@ class GraphicsMagickPreset extends AbstractImagePreset implements Configuration\
                        } else {
                                $executable = 'gm';
                        }
-                       if (@is_dir($path) && @is_file($path . $executable)) {
+                       if (@is_file($path . $executable)) {
                                $command = escapeshellarg($path . $executable) . ' -version';
                                $executingResult = FALSE;
                                \TYPO3\CMS\Core\Utility\CommandUtility::exec($command, $executingResult);
index 093d8e6..13c89dc 100644 (file)
@@ -80,7 +80,7 @@ class ImageMagick6Preset extends AbstractImagePreset implements Configuration\Pr
                        } else {
                                $executable = 'identify';
                        }
-                       if (@is_dir($path) && @is_file($path . $executable)) {
+                       if (@is_file($path . $executable)) {
                                $command = escapeshellarg($path . $executable) . ' -version';
                                $executingResult = FALSE;
                                \TYPO3\CMS\Core\Utility\CommandUtility::exec($command, $executingResult);