in reply to Re: Re: unix write command through system
in thread unix write command through system

Or, instead of just trying to verify the shell paramaters, you can properly escape them. Like:
for ($message,$user,tty) { s/'/'\\''/g; } system("echo '$message' |/usr/bin/write '$user' '$tty'");
That way if someone tries to pass in a $message of '; rm -rf /; echo ' then, it's cool, you just write that out, not execute it.

------------
:Wq
Not an editor command: Wq