Fix taint bug in previous commit.

This commit is contained in:
Dag-Erling Smørgrav 2003-07-18 07:29:00 +00:00
parent cc1f50a9fe
commit 90e476c26d

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");
}