> From: Trond Michelsen [mailto:[EMAIL PROTECTED]] > Sent: 28 August 2002 13:07 > To: Jason Timmins > Cc: Template List > Subject: Re: [Templates] Insecure dependency > > On Wed, Aug 28, 2002 at 11:26:09AM +0100, Jason Timmins wrote: > >> $path = $file; > >> $path =~ /^(.+)$/s or die "invalid filename: $path"; > >> $path =~ s[:][]g if $^O eq 'MSWin32'; > >> $compiled = "$compdir$path$compext"; > >> $compiled =~ s[//][/]g; > >> + $compiled = $1 if /(.*)/; # taint cleaning > > > With this new line inserted it no-longer bitches about insecure > dependency, > > but instead I get an error about an uninitialized value.... > > The problem is that the regex is matching on $_ instead of $compiled. > Try this instead: > > $compiled = $1 if $compiled =~ /(.*)/; # taint ignoring > > >> return $compiled; > >> } > > -- > Trond Michelsen
Thanks Thrond, that worked like a charm. As someone new to Perl, I'm not overly keen on those (for want of a better term) implicit variables ($_ and such like) I guess I just like to have it all spelt out for me. However, now that the caching is working, everything does seem to be faster. I've just got one more problem then, I swear, I'll leave you all alone. ;-) Since upgrading to the latest release of the TT (2.08?) I've been getting these errors in the Apache log.... Subroutine O_CREAT redefined at /usr/lib/perl5/Exporter.pm line 57. at /html/resources/perl//ILM_Utils.pm line 11 Subroutine O_EXCL redefined at /usr/lib/perl5/Exporter.pm line 57. at /html/resources/perl//ILM_Utils.pm line 11 Subroutine O_RDWR redefined at /usr/lib/perl5/Exporter.pm line 57. at /html/resources/perl//ILM_Utils.pm line 11 Line 11 in my code is... use POSIX; I've spoken to the guy that originally wrote this code and he says that this POSIX stuff has got to stay but I'd like to get rid of these messages if I could. Any ideas why upgrading from 2.04 to 2.08 would cause this? (Sorry, if you've already been speaking about this on the list.) Cheers Jason. ________________________________________________________________________ This email has been scanned for all viruses by the TWF Internet Anti- Virus Email service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.twfinternet.com ________________________________________________________________________ _______________________________________________ templates mailing list [EMAIL PROTECTED] http://www.template-toolkit.org/mailman/listinfo/templates
