Re: [PATCH 4/n] gitweb: Secure against commit-ish/tree-ish with the same name as path

From: Jakub Narebski <jnareb@gmail.com>
Date: 2006-11-01 03:53:20
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_ <tree-ish> so there
is no way to mistake pathspec with <tree-ish>.

Bit overeager adding of "--"... 
-- 
Jakub Narebski
Poland
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Nov 01 03:53:27 2006

This archive was generated by hypermail 2.1.8 : 2006-11-01 03:54:26 EST