From: Jakub Narebski Date: Tue, 31 Oct 2006 16:53:20 GMT Subject: Re: [PATCH 4/n] gitweb: Secure against commit-ish/tree-ish with the same name as path Message-ID: <200610311753.20711.jnareb@gmail.com> In-Reply-To: <200610302229.06957.jnareb@gmail.com> Jakub Narebski wrote: > @@ -2970,7 +2972,7 @@ sub git_tree { >                 } >         } >         $/ = "\0"; > -       open my $fd, "-|", git_cmd(), "ls-tree", '-z', $hash > +       open my $fd, "-|", git_cmd(), "ls-tree", '-z', $hash, "--" >                 or die_error(undef, "Open git-ls-tree failed"); >         my @entries = map { chomp; $_ } <$fd>; >         close $fd or die_error(undef, "Reading tree failed"); Please remove this chunk from patch!. It makes gitweb "tree" view empty. I have forgot that git-ls-tree _requires_ so there is no way to mistake pathspec with . Bit overeager adding of "--"... -- Jakub Narebski