I was concerned about duplicating code, but the more I thought about it, it seems that Test::Taint really obviates both Taint distributions. It seems to me that the only time you would want to taint data would be in testing, which of course this covers. Thoughts?
Here's an example:
use Test::Taint tests=>4; taint_checking_ok(); # We have to have taint checking on my $id = "deadbeef"; # Dummy session ID taint( $id ); # Simulate it coming in from the web tainted_ok( $id ); $id = validate_id( $id ); # Your routine to check the $id untainted_ok( $id ); # Did it come back clean? ok( defined $id );
xoxo,
Andy
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Test::Taint 0.01 is out
by Corion (Patriarch) on Feb 04, 2004 at 07:33 UTC | |
by ysth (Canon) on Feb 04, 2004 at 08:59 UTC | |
by petdance (Parson) on Feb 04, 2004 at 16:07 UTC | |
|
Re: Test::Taint 0.01 is out
by mr_mischief (Monsignor) on Feb 05, 2004 at 20:02 UTC | |
by petdance (Parson) on Feb 06, 2004 at 00:56 UTC | |
by mr_mischief (Monsignor) on Feb 06, 2004 at 15:00 UTC |