git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitweb: fix support for repository directories with spaces
@ 2008-06-17  1:09 Lea Wiemann
  2008-06-17  1:14 ` Junio C Hamano
  2008-06-17  1:38 ` [PATCH] gitweb: fix support for repository directories with spaces Jakub Narebski
  0 siblings, 2 replies; 9+ messages in thread
From: Lea Wiemann @ 2008-06-17  1:09 UTC (permalink / raw)
  To: git; +Cc: Lea Wiemann

git_cmd_str does not quote the directory names without this patch.

Signed-off-by: Lea Wiemann <LeWiemann@gmail.com>
---
git_cmd_str is really really bad from a security POV: Where it is
used, command lines are passed to the shell, which (I believe) just
*happen* to open no security holes.  Hence the function should
ultimately go away.  However, let's make the tests work for the
meantime while it's still there.

 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 07e64da..0bddc31 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1502,7 +1502,7 @@ sub git_cmd {
 
 # returns path to the core git executable and the --git-dir parameter as string
 sub git_cmd_str {
-	return join(' ', git_cmd());
+	return join ' ', map("'$_'", git_cmd());
 }
 
 # get HEAD ref of given project as hash
-- 
1.5.6.rc3.7.ged9620

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-06-17 23:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-17  1:09 [PATCH] gitweb: fix support for repository directories with spaces Lea Wiemann
2008-06-17  1:14 ` Junio C Hamano
2008-06-17 21:27   ` Junio C Hamano
2008-06-17 21:46   ` [PATCH v2] gitweb: quote commands properly when calling the shell Lea Wiemann
2008-06-17 21:51     ` Lea Wiemann
2008-06-17 23:41     ` Junio C Hamano
2008-06-17  1:38 ` [PATCH] gitweb: fix support for repository directories with spaces Jakub Narebski
2008-06-17 22:07   ` Lea Wiemann
2008-06-17 22:27     ` Jakub Narebski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).