Re: removing functions?
| From: | Zeev Suraski | Date: | Sun, 28 May 2000 21:16:28 +0000 |
| Subject: | Re: removing functions? | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-19649@lists.php.net to get a copy of this message | ||
I think it may be worth it to allow administrators to replace the implementation of a given function with a built-in function, that says that the function that has been called has been disabled for security reasons. This function will not be configurable - so that it doesn't give you any rope at all. It'll simply prevent that specific function from working, report it clearly to the end user, and prevent libraries from overwriting it.
Would that be ok?
Zeev
At 21:47 28/05/2000 , Chuck Adams wrote:
-- Zeev Suraski <zeev@zend.com> http://www.zend.com/That way, you can do what you need to do in user-space, but the adminstillhas control over whether you can or can't do it in the first place.I'm against it. How about this then: a security manager class that intercepts calls to functions. You'd really have to go well out of your way to screw yourself with this sort of thing. class SecurityManager {function set_security_manager() { die("another Security Manager may not be set"); }function dl() { die("dl function disabled"); }function system() { die("system function disabled"); }function fopen($path, $mode) { if ($mode != "r") { die("Files can only be opened read-only"); } else { // calls from inside the securitymanager aren't intercepted return fopen($path, $mode); } }} set_security_manager(new SecurityManager); chuck "system('rm -rf .')" is plenty of rope" adams