summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-07-18 07:29:00 +0000
committerdes <des@FreeBSD.org>2003-07-18 07:29:00 +0000
commit76be06b592a873bdc5151777e955c4a870145af8 (patch)
tree607dd04ee07411867ad9820dd3f1988121aaaa97 /tools
parent23627a92716867e074bb3b009f5e42e03965e5a5 (diff)
downloadFreeBSD-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.cgi6
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");
}
OpenPOWER on IntegriCloud