Permalink
Browse files

Fix issue #300

  • Loading branch information...
1 parent 5793c33 commit 6b499f53c6b5db9aae76d8a5f5880cb9904ffd0d @carsomyr carsomyr committed Nov 8, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/capistrano/recipes/deploy.rb
@@ -287,7 +287,8 @@ def try_runner(*args)
if fetch(:normalize_asset_timestamps, true)
stamp = Time.now.utc.strftime("%Y%m%d%H%M.%S")
asset_paths = fetch(:public_children, %w(images stylesheets javascripts)).map { |p| "#{escaped_release}/public/#{p}" }
@javanthropus
javanthropus Nov 28, 2012

In case :public_children contains elements with unsafe characters, wouldn't it be a good idea to perform shellescape on each element of it?

asset_paths = fetch(:public_children, %w(images stylesheets javascripts)).map { |p| "#{escaped_release}/public/#{p.shellescape}" }
- run("find #{asset_paths.join(" ").shellescape} -exec touch -t -- #{stamp} {} ';'; true", :env => { "TZ" => "UTC" }) if asset_paths.any?
+ run("find #{asset_paths.join(" ")} -exec touch -t #{stamp} -- {} ';'; true",
+ :env => { "TZ" => "UTC" }) if asset_paths.any?
end
end

0 comments on commit 6b499f5

Please sign in to comment.