X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/df87aa32ff8e2b6c61379cdbf66faff889285a74583685a80c36697debf77503..5aa0e133c3464758c4bf550ef4dfea466b31ddf9855c295140a6d5007d33060a:/gitweb.pl diff --git a/gitweb.pl b/gitweb.pl index 9cf2dc7..719c4ae 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 042 # # (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 - +