summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2008-11-05 22:15:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-11-07 00:38:01 (GMT)
commitec26f098a6593bbd9d396fb7ee74368cdd3eeed3 (patch)
treea3b322032b2664ff21c3fea25b7164b907fa9f5b /gitweb
parent19fb896f5b6f3e52370b43e4c9339bcbe4c0f2dd (diff)
downloadgit-ec26f098a6593bbd9d396fb7ee74368cdd3eeed3.zip
git-ec26f098a6593bbd9d396fb7ee74368cdd3eeed3.tar.gz
git-ec26f098a6593bbd9d396fb7ee74368cdd3eeed3.tar.bz2
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 <angavrilov@gmail.com> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl3
1 files changed, 1 insertions, 2 deletions
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 {