Commit bf13f265 by Paul Klimov

"AssetConverter::convert()" has been updated to use "escapeshellargs"

parent a25a34d7
...@@ -47,8 +47,8 @@ class AssetConverter extends Component implements IAssetConverter ...@@ -47,8 +47,8 @@ class AssetConverter extends Component implements IAssetConverter
if (@filemtime("$basePath/$result") < filemtime("$basePath/$asset")) { if (@filemtime("$basePath/$result") < filemtime("$basePath/$asset")) {
$output = array(); $output = array();
$command = strtr($command, array( $command = strtr($command, array(
'{from}' => "$basePath/$asset", '{from}' => escapeshellarg("$basePath/$asset"),
'{to}' => "$basePath/$result", '{to}' => escapeshellarg("$basePath/$result"),
)); ));
exec($command, $output); exec($command, $output);
Yii::info("Converted $asset into $result: " . implode("\n", $output), __METHOD__); Yii::info("Converted $asset into $result: " . implode("\n", $output), __METHOD__);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment