User Input sanitization for input in os-command

Posted by jankeir on 20-Jan-2017 05:21

I've got a situation where I want to pass a shell script a parameter that came in through a rest API.

Does anyone have a thoroughly tested piece of code to stop a user from entering ";rm -rf / ? 

Something like http://php.net/manual/en/function.escapeshellarg.php . 

All Replies

This thread is closed