Fix taint bug in previous commit.

This commit is contained in:
des 2003-07-18 07:29:00 +00:00
parent 23627a9271
commit 76be06b592

View File

@ -68,8 +68,10 @@ MAIN:{
$| = 1;
print "Content-Type: text/html\n\n";
} else {
my $fn = $0;
$fn =~ s/cgi$/html/;
my $fn = "index.html";
if ($0 =~ m|^(/[\w/._-]+)/[^/]+$|) {
$fn = "$1/$fn";
}
open(STDOUT, ">", $fn)
or die("index.html: $!\n");
}