in reply to disable taint for just one sub
although, i would suggest actually using the regex to check that the data is valid (be it numeric, string, or whatever) ... thats what taint checking is for, and why the regex works.sub untaint { my (@refs) = @_; my $cnt++; foreach my $RvSv (@refs) { ${$RvSv} =~ m/^.*$/; ${$RvSv} = $1; $cnt++; } return($cnt); } ## use as $untained_count = untaint(\$a,\$b);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: disable taint for just one sub
by AidanLee (Chaplain) on Jul 23, 2001 at 19:15 UTC | |
by John M. Dlugosz (Monsignor) on Jul 24, 2001 at 01:33 UTC | |
|
Re: Re: disable taint for just one sub
by khippy (Scribe) on Jul 23, 2001 at 18:34 UTC | |
by ichimunki (Priest) on Jul 23, 2001 at 20:55 UTC |