So the offending lines are these:
# DON'T LOOK NOW! - blindly untainting can make you go blind!
$block =~ /(.*)/s;
$block = $1;
$block = eval $block; <-- this line here
return $class->error($@)
unless defined $block;
The Template Toolkit works by processing the template file and turning it into a bunch of Perl code which this eval then compiles. It also caches this generated Perl code to disk as long as the original template files don't change. Hence the untainting above.
But since we're blindly untainting, I can't see how we can have the problem that you're describing. It shouldn't happen. No sir.
I call bug in perl. |