T
T
Tom2018-06-11 00:22:49
PHP
Tom, 2018-06-11 00:22:49

Is there a white list of php functions?

There are two questions:
first, it is necessary to create a white list of functions for the user to use. so that functions such as popen, pclose, exec, system, include, etc. are excluded.
Has anyone done this?
and secondly, what dangers can the code executed through cmd cause. That is, a php file is executed that calls cmd and then executes some instructions. what can it threaten?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey, 2018-06-11
@VELIK505

so that functions such as popen,pclose,exec,system,include are excluded

in php.ini
It is also possible not globally but for the user to make a separate php.ini and list the prohibited functions there.

R
Rastishka, 2018-06-25
@Rastishka

Once played with such a thing: evileval.sourceforge.net

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question