[Asterisk-Users] callerid send to shell script with system command

Michael Graff Michael_Graff at isc.org
Wed Apr 30 11:54:13 MST 2003


Another way (in Perl) that is very secure, assuming your script that is
called is:

        sytem("foo $callerid")

isn't safe, but

        system("foo", $callerid)

is.  It doesn't use the shaell to execute things, so you can't redirect
output and the like, but $callerid is passed directly to the the foo
application without shell metacharacters being involved at all.

--Michael



More information about the asterisk-users mailing list