From ec26f098a6593bbd9d396fb7ee74368cdd3eeed3 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Thu, 6 Nov 2008 01:15:56 +0300 Subject: gitweb: Use single implementation of export_ok check. 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 Acked-by: Jakub Narebski Signed-off-by: Junio C Hamano diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 9d1af7e..68bdf62 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -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 { -- cgit v0.10.2-6-g49f6