From 54b0a43c3f64b02ecd30aceb5ad58842e4a6a4b2 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sun, 7 Aug 2005 20:08:03 +0200 Subject: [PATCH] v041 --- gitweb.pl | 54 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/gitweb.pl b/gitweb.pl index 6452f33e..86c3b798 100755 --- a/gitweb.pl +++ b/gitweb.pl @@ -2,7 +2,7 @@ # gitweb.pl - simple web interface to track changes in git repositories # -# Version 035 +# Version 041 # # (C) 2005, Kay Sievers # (C) 2005, Christian Gierke @@ -27,12 +27,14 @@ my $project = $cgi->param('p'); my $action = $cgi->param('a'); my $hash = $cgi->param('h'); my $hash_parent = $cgi->param('hp'); -my $time_back = $cgi->param('t'); +my $time_back = $cgi->param('t') || 1; $ENV{'SHA1_FILE_DIRECTORY'} = "$projectroot/$project/.git/objects"; # sanitize input $action =~ s/[^0-9a-zA-Z\.\-]//g; $project =~ s/\/\.//g; +$project =~ s/^\/+//g; +$project =~ s/\/+$//g; $project =~ s/|//g; $hash =~ s/[^0-9a-fA-F]//g; $hash_parent =~ s/[^0-9a-fA-F]//g; @@ -45,11 +47,11 @@ print < git - $project $action - +