From 793accb14aedd74451aa4b7ae95b29eb5aef09b2 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 25 May 2011 23:50:59 +0000 Subject: [PATCH] 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 --- lib/redmine/scm/adapters/abstract_adapter.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 -- 2.39.5