diff options
author | des <des@FreeBSD.org> | 2003-07-18 07:29:00 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-07-18 07:29:00 +0000 |
commit | 76be06b592a873bdc5151777e955c4a870145af8 (patch) | |
tree | 607dd04ee07411867ad9820dd3f1988121aaaa97 /tools | |
parent | 23627a92716867e074bb3b009f5e42e03965e5a5 (diff) | |
download | FreeBSD-src-76be06b592a873bdc5151777e955c4a870145af8.zip FreeBSD-src-76be06b592a873bdc5151777e955c4a870145af8.tar.gz |
Fix taint bug in previous commit.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/tinderbox/www/index.cgi | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/tools/tinderbox/www/index.cgi b/tools/tools/tinderbox/www/index.cgi index fc42e79..86346aa 100644 --- a/tools/tools/tinderbox/www/index.cgi +++ b/tools/tools/tinderbox/www/index.cgi @@ -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"); } |