]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: PATH_INFO=/ means no project
authorJakub Narebski <redacted>
Sat, 5 Aug 2006 11:16:03 +0000 (13:16 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:05:47 +0000 (00:05 -0400)
Prepared for refactoring input validation.

Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 7014e4188a9f990446b3022af5700c080ff1827722283e63b1a45689369fc3a9..91776bdbfd47a47100d957a4b31cd68fe4bda123252ac02559624a90f1b7cf9b 100755 (executable)
@@ -86,8 +86,8 @@ if (defined $action) {
 }
 
 our $project = ($cgi->param('p') || $ENV{'PATH_INFO'});
-if (defined $project) {
-       $project =~ s|^/||; $project =~ s|/$||;
+$project =~ s|^/||; $project =~ s|/$||;
+if (defined $project && $project) {
        if (!validate_input($project)) {
                die_error(undef, "Invalid project parameter");
        }
This page took 0.234328 seconds and 4 git commands to generate.