git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-quiltimport: fix security risk because of un-sanitized $level.
@ 2008-03-12 20:46 Pierre Habouzit
  2008-03-12 20:55 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre Habouzit @ 2008-03-12 20:46 UTC (permalink / raw)
  To: Git ML, Junio C Hamano

[-- Attachment #1: Type: text/plain, Size: 895 bytes --]

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
---

  I assume that nobody will have a series with -p1000 in it :)
  sorry for this gross mistake in the first place.

  [ for the inattentive readers $level was used without quoting, for
    good reasons as it's sometime empty and then we don't want to pass
    an empty argument to git-apply, though someone could use that to run
    arbitrary commands, not nice ]

 git-quiltimport.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-quiltimport.sh b/git-quiltimport.sh
index 84c8b8e..d35cb02 100755
--- a/git-quiltimport.sh
+++ b/git-quiltimport.sh
@@ -67,7 +67,7 @@ while read patch_name level garbage
 do
 	case "$patch_name" in ''|'#'*) continue;; esac
 	case "$level" in
-	-p*);;
+	-p[0-9]|-p[0-9][0-9]|-p[0-9][0-9][0-9]);;
 	''|'#'*)
 		level=;;
 	*)
-- 
1.5.4.4.599.gba501

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2008-03-12 22:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-12 20:46 [PATCH] git-quiltimport: fix security risk because of un-sanitized $level Pierre Habouzit
2008-03-12 20:55 ` Junio C Hamano
2008-03-12 22:29   ` Pierre Habouzit

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).