Browse Source

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

tags/2.0.0-beta
Paul Klimov 12 years ago
parent
commit
bf13f26584
  1. 4
      framework/yii/web/AssetConverter.php

4
framework/yii/web/AssetConverter.php

@ -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__);

Loading…
Cancel
Save