Andy Wardley <[EMAIL PROTECTED]> writes:
> On Sun, Jun 17, 2001 at 04:50:53PM +0200, Jonas Liljegren wrote:
> > This is my quick fixes for 2.03 regarding the tainted data.
>
> Many thanks! Patch applied.
Eh. I thought you would like to do something instead of just dying
without a message.
Anyway. There was one more.
Trying to attatch a patch with that -u format for the second part...
--- /usr/local/src/cpan/build/Template-Toolkit-2.03/lib/Template/Provider.pm Fri Jun 15 16:30:56 2001
+++ /usr/local/share/perl/5.6.0/Template/Provider.pm Sun Jun 17 18:14:35 2001
@@ -422,7 +422,8 @@
# %INC entry to ensure it is reloaded (we don't
# want 1 returned by require() to say it's in memory)
delete $INC{ $compiled };
- eval { $data = require $compiled };
+ my($ccompiled) = $compiled =~ /^([\w\-\.\/]+)$/ or die;
+ eval { $data = require $ccompiled };
if ($data && ! $@) {
# store in cache
@@ -714,7 +715,9 @@
if (!defined($error)) {
# set atime and mtime of newly compiled file
- utime($data->{ time }, $data->{ time }, $compfile);
+ my( $ccompfile ) = $compfile =~ /^([\w\-\.\/]+)$/ or die;
+ my( $ctime ) = $data->{ time } =~ /^(\d+)$/ or die;
+ utime($ctime, $ctime, $ccompfile);
}
}
--
/ Jonas - http://jonas.liljegren.org/myself/en/index.html