From 9980d2e72ab148fa8bbd10f71ec1b7dc7058779e Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Mon, 5 Oct 2015 19:52:06 +0000 Subject: [PATCH] #1156: properly escape file paths containing spaces SVN:trunk[3795] --- core/simplegraph.class.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/simplegraph.class.inc.php b/core/simplegraph.class.inc.php index 1dffe56af..8a5ea1a31 100644 --- a/core/simplegraph.class.inc.php +++ b/core/simplegraph.class.inc.php @@ -516,7 +516,7 @@ EOF @fwrite($rFile, $sDotDescription); @fclose($rFile); $aOutput = array(); - $CommandLine = "\"$sDotExecutable\" -v -Tpng < $sDotFilePath -o$sImageFilePath 2>&1"; + $CommandLine = "\"$sDotExecutable\" -v -Tpng < \"$sDotFilePath\" -o\"$sImageFilePath\" 2>&1"; exec($CommandLine, $aOutput, $iRetCode); if ($iRetCode != 0) @@ -572,7 +572,7 @@ EOF @fwrite($rFile, $sDotDescription); @fclose($rFile); $aOutput = array(); - $CommandLine = "\"$sDotExecutable\" -v -Tdot < $sDotFilePath -o$sXdotFilePath 2>&1"; + $CommandLine = "\"$sDotExecutable\" -v -Tdot < \"$sDotFilePath\" -o\"$sXdotFilePath\" 2>&1"; exec($CommandLine, $aOutput, $iRetCode); if ($iRetCode != 0)