User
I am trying to program a web interface for automated generation of calculus tests. The idea is to take some input from user, say number of problems and name of instructor, and then by means of php generate the latex file, process it with pdflatex and let user download it.
The procedure seems to be quite straightforward. But what if somebody enters for instructor name something like "Mr. Mackey \input{/etc/hosts}" ?
looks like one can retrieve any file accessible to web server.
How to prevent this? May be there are natural php ways? I am very new to php, and would appreciate any advice.
General Tech Technology & Software
1 Replies