fix quoted filename lookup
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Kay Sievers committed
Nov 24, 2005 at 18:14 UTC
ae78620525445407cca9830b7395668388769db6
1 file changed
+2
-2
gitweb.cgi
+2
-2
@@ -1294,7 +1294,7 @@ sub git_get_hash_by_path {
1294
my $t_mode = $1;
1295
my $t_type = $2;
1296
my $t_hash = $3;
1297
- my $t_name = $4;
1297
+ my $t_name = validate_input(unquote($4));
1298
if ($t_name eq $part) {
1299
if (!(@parts)) {
1300
return $t_hash;
@@ -1311,7 +1311,7 @@ sub git_get_hash_by_path {
1311
sub git_blob {
1312
if (!defined $hash && defined $file_name) {
1313
my $base = $hash_base || git_read_hash("$project/HEAD");
1314
- $hash = git_get_hash_by_path($base, $file_name, "blob");
1314
+ $hash = git_get_hash_by_path($base, $file_name, "blob") || die_error(undef, "Error lookup file.");
1315
}
1316
open my $fd, "-|", "$gitbin/git-cat-file blob $hash" or die_error(undef, "Open failed.");
1317
git_header_html();