3 ms·
I've never worked with PHP before, so basedir meant nothing to me. A minute with Google turned this up: http://php.net/manual/en/ini.core.php#ini.open-basedir
by wtracy 10y ago
I've never worked with PHP before, so basedir meant nothing to me. A minute with Google turned this up:
http://php.net/manual/en/ini.core.php#ini.open-basedir http://php.net/manual/en/ini.core.php#ini.open-basedir
I have to say, for all the general brain-deadness we hear about from the PHP community, the core developers have made a lot of progress on cleaning up their mess. I don't know of anything equivalent to this functionality from Python or Ruby.
- malux85 10y agoI think basedir like functionality is a good idea, but this is not the languages responsibility, this is an operational concern. There's too many ways around it if you're trying to do this in a language ... for example, limiting checks on the open() call would be relatively straight forward, but what about people who use syscalls directly from the language? Or what about shelling out to another process? Chroot jails get kind of close of this in a very broad/blunt way, but back to my original point: This is not the languages responsibility
- viraptor 10y agoPHP doesn't have direct access to syscalls. (not without extensions anyway) exec / system / other shelling out functions should be disabled unless you actually know you need them.
- viraptor 10y agoThis is not new. PHP3 already had it, but not many people actually care enough to use it. Other languages have LSMs and seccomp (linux), pledge (bsds), chroot (all *nix). It doesn't need to be built into the language itself.