![]() |
|
There's more than one way to do things | |
PerlMonks |
Untainting system calls correctlyby c (Hermit) |
on Apr 10, 2002 at 16:12 UTC ( #158057=perlquestion: print w/replies, xml ) | Need Help?? |
c has asked for the wisdom of the Perl Monks concerning the following question:
I'm reading through perldoc perlsec in the hopes of getting a system() call to work with taint checking enabled. In particular, I have been staring at:
my system call is:
I have the following in my script which I had hoped would allow for this command to be used:
I stuck in that print "CLI is $cli" to see just what I was getting out of it. Sure enough, it is as i expected it to be.
In the course of my testing, I've also untainted the $shell $home $group and $formdata{username} variables. When I dont use $cli and instead just pass the $formdata{username} variable to the system call, it works. It seems like the problem is only when I pass all the command line flags as part of $cli. this has become my white whale for the day's chasing. thanks -c
Back to
Seekers of Perl Wisdom
|
|