From 3bed0704bb7fa0d3b6b8e8501b8ca6bbca7762bd Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Tue, 26 Dec 2006 20:50:43 +0000 Subject: [PATCH] fix so it runs in tainted mode --- index.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.pl b/index.pl index f9a5345..abedcdf 100755 --- a/index.pl +++ b/index.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl -w -T #************************************************************************** # Copyright (C) 2006 by Michael Andreen * # * @@ -25,15 +25,15 @@ use DBI; use DBD::Pg qw(:pg_types); use strict; - my $cgi = new CGI; - -chdir $ENV{'DOCUMENT_ROOT'}; - our $DBH = undef; our $USER = $ENV{'REMOTE_USER'}; my $error; +if ($ENV{'DOCUMENT_ROOT'} =~ m{((\w|/)+)}){ + chdir $1; +} + our $TEMPLATE = HTML::Template->new(filename => 'templates/skel.tmpl', global_vars => 1); for my $file ("db.pl","include.pl"){ -- 2.39.2