Forum Moderators: coopster
But... what can i do if an admin becomes "evil" and adds some kind of malicious code? for example: unlink() or a $sql = 'DROP database...' etc...
? Is there a way to stop critical commands like those?
I know that admins should be responsable of their own password, but you never know.
Any ideas? Thanks.
If you scan for "DROP " to prevent a DROP DATABASE, then how about this:
$abc = 'D';
$x = "base";
$abc .= 'R' . "OP";
$y = 'data' . $x;
$sql = $abc . " " . $y;
It is a can of worms.
Kind regards,
R.
But... what can i do if an admin becomes "evil" and adds some kind of malicious code? for example: unlink() or a $sql = 'DROP database...' etc...
you can do nothing about that. even preg_replace won't help you, this will just lead to the situation making your code more complex and even more critical. there is no such routine to filter out "bad" commands. your computer just nows commands so it will execute commands. your computer does not judge about wethere these commands are good or bad.
since php is a very complex language with a lot of features, there is no such filter on specific executions would could classify as bad. there is even no way of classification i guess.
for your applikation i would suggest to use some other language which just has got alle the features needed for plugins and nothing more in addition.
--hakre
; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
disable_functions =