There's more than one way to do things | |
PerlMonks |
Re: problems with exec commandby betterworld (Curate) |
on Feb 14, 2014 at 14:39 UTC ( [id://1074964]=note: print w/replies, xml ) | Need Help?? |
Your script is a huge security problem with both exec and system. Somebody passes a "name", and you embed it in a shell command. It may contain a ";" and an arbitrary shell command. Read the system() documentation about how you can pass the arguments as an array. And also filter the input. Allow only alphabetic characters, or only specific names.
In Section
Seekers of Perl Wisdom
|
|