Subject: | Taint flag breaks template for-loop parsing |
When running under perl with taint flag enabled and with cache set to 0,
the following error is raised when parsing loops:
Text::Xslate: Functions must be a CODE reference, not 7
(/home/illusori/TextXslate.txt:11:&main[33]) at ./perl/test_xslate_bug
line 54
main::run_template('TextXslate.txt', 'HASH(0x9f4b8f0)',
'HASH(0x9f4cda0)') called at ./perl/test_xslate_bug line 41
----------------------------------------------------------------------------
<: for $array_loop ->($i) { :><:= $i :><: } :>
<: for $hash_loop.keys() ->($k) { :><:= $k :>: <:= $hash_loop[ $k ] :><:
} :>
<: for $records_loop ->($r) { :><:= $r.name :>: <:= $r.age :><: } :>
----------------------------------------------------------------------------
If taint mode is turned off, the template executes correctly and
produces the expected output.
The attached tarball contains two scripts and a template to reproduce
these two scenarios.
Running either with XSLATE='pp' set appears to cause correct behaviour
with both scripts.
Subject: | xslate_taint_bug.tgz |
Message body not shown because it is not plain text.