From: Toshi MARUYAMA Date: Wed, 25 May 2011 23:50:59 +0000 (+0000) Subject: scm: switch to use shell quote with parameter in abstract adapter target(). X-Git-Tag: 1.3.0~1943 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=793accb14aedd74451aa4b7ae95b29eb5aef09b2;p=redmine.git scm: switch to use shell quote with parameter in abstract adapter target(). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5906 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/scm/adapters/abstract_adapter.rb b/lib/redmine/scm/adapters/abstract_adapter.rb index 81a24af81..afff2ffd7 100644 --- a/lib/redmine/scm/adapters/abstract_adapter.rb +++ b/lib/redmine/scm/adapters/abstract_adapter.rb @@ -184,10 +184,14 @@ module Redmine info ? info.root_url : nil end - def target(path) + def target(path, sq=true) path ||= '' base = path.match(/^\//) ? root_url : url - shell_quote("#{base}/#{path}".gsub(/[?<>\*]/, '')) + str = "#{base}/#{path}".gsub(/[?<>\*]/, '') + if sq + str = shell_quote(str) + end + str end def logger