Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Text-Xslate CPAN distribution.

Report information
The Basics
Id: 61359
Status: resolved
Priority: 0/
Queue: Text-Xslate

People
Owner: Nobody in particular
Requestors: SGRAHAM [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.2006
Fixed in: (no value)



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
Download xslate_taint_bug.tgz
application/x-gtar 1k

Message body not shown because it is not plain text.

Oh, I didn't test xslate while -T! Thanks! I have released 0.2007 with your tests.