Skip to content

Commit fb3bb3d

Browse files
doucettegitster
authored andcommitted
gitweb: Fix export check in git_get_projects_list
When $filter was empty, the path passed to check_export_ok would contain an extra '/', which some implementations of export_auth_hook are sensitive to. It makes more sense to fix this here than to handle the special case in each implementation of export_auth_hook. Signed-off-by: Devin Doucette <[email protected]> Acked-by: Jakub Narebski <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a9012e3 commit fb3bb3d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

gitweb/gitweb.perl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,8 +2147,9 @@ sub git_get_projects_list {
21472147

21482148
my $subdir = substr($File::Find::name, $pfxlen + 1);
21492149
# we check related file in $projectroot
2150-
if (check_export_ok("$projectroot/$filter/$subdir")) {
2151-
push @list, { path => ($filter ? "$filter/" : '') . $subdir };
2150+
my $path = ($filter ? "$filter/" : '') . $subdir;
2151+
if (check_export_ok("$projectroot/$path")) {
2152+
push @list, { path => $path };
21522153
$File::Find::prune = 1;
21532154
}
21542155
},

0 commit comments

Comments
 (0)