]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Fix export check in git_get_projects_list
authorDevin Doucette <redacted>
Sat, 27 Dec 2008 09:39:31 +0000 (02:39 -0700)
committerLady <redacted>
Mon, 6 Apr 2026 04:50:38 +0000 (00:50 -0400)
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 <redacted>
Acked-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index f49abf14e72872171ffbbbc4d26f53902c390f693b00df6b406fc3caf0e3cc1d..41f3af74faf7c303ab11455eb4b34ff357d34ccd54c9a72f1b06fb175e5c07d0 100755 (executable)
@@ -2152,8 +2152,9 @@ sub git_get_projects_list {
 
                                my $subdir = substr($File::Find::name, $pfxlen + 1);
                                # we check related file in $projectroot
-                               if (check_export_ok("$projectroot/$filter/$subdir")) {
-                                       push @list, { path => ($filter ? "$filter/" : '') . $subdir };
+                               my $path = ($filter ? "$filter/" : '') . $subdir;
+                               if (check_export_ok("$projectroot/$path")) {
+                                       push @list, { path => $path };
                                        $File::Find::prune = 1;
                                }
                        },
This page took 0.353719 seconds and 4 git commands to generate.