Security of executing a command from php

2019-08-27 19:09发布

I'm writing a web application in which i use several thirdy party commands calling them with the exec function in PHP (for example, I render Latex formulas through a command-line program).

My question is: what are the security issues of executing external command-line programs in php? What I have to be aware of? Can you give me a list of points to check?

EDIT: I'm aware that I have to clean the user input to prevent executing arbitrary commands... Are there any other things to check?

Thanks in advance.

7条回答
别忘想泡老子
2楼-- · 2019-08-27 19:53

How about using not cleansing your user inputs so they can execute any command they like... such as format ;-)

查看更多
登录 后发表回答