in reply to Untainting known good data
Update: Ok, I missed the qq, that just makes it a little trickier. What if $tmp1 is '@{[unlink "/"]}' ?
I don't see the need to call eval anyway, use a closure:
More update: I see this doesn't account for eval'ing the substitutions you're making, but I would rethink those also, the way you are 'calling' the 'template::gettmplsub' sub it will not get executed anyway. (Hmm, I guess it will later...)# I assume this is just an example, as '$c' and '@a' serve # no real purpose here my $sub; { my $tmp = $tmp1; # You could even skip assigning to '$tmp' if '$tmp1' # already 'enclosed' in another limited context $sub = sub { my $c = shift; my @a = ($tmp); return @a; }; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Untainting known good data
by Cine (Friar) on Sep 07, 2001 at 03:27 UTC |