Skip to content

Commit

Permalink
gitweb: Use single implementation of export_ok check.
Browse files Browse the repository at this point in the history
GitWeb source contains a special function that implements the
export_ok check, but validate_project still uses a separate copy
of essentially the same code.

This patch makes it use the dedicated function, thus ensuring
that all checks are done through a single code path.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Alexander Gavrilov authored and Junio C Hamano committed Nov 7, 2008
1 parent 19fb896 commit ec26f09
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -853,8 +853,7 @@ sub validate_project {
my $input = shift || return undef;
if (!validate_pathname($input) ||
!(-d "$projectroot/$input") ||
!check_head_link("$projectroot/$input") ||
($export_ok && !(-e "$projectroot/$input/$export_ok")) ||
!check_export_ok("$projectroot/$input") ||
($strict_export && !project_in_list($input))) {
return undef;
} else {
Expand Down

0 comments on commit ec26f09

Please sign in to comment.