#24333 [Opn->Csd]: stat() and file_exists() is neither affected by safe_mode nor open_basedir

From: Date: Wed, 25 Jun 2003 15:32:40 +0000
Subject: #24333 [Opn->Csd]: stat() and file_exists() is neither affected by safe_mode nor open_basedir
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-42497@lists.php.net to get a copy of this message
ID: 24333 Updated by: sniper@php.net Reported By: david at darville dot name -Status: Open +Status: Closed Bug Type: Filesystem function related Operating System: RedHat Linux PHP Version: 4.3.2 New Comment: Already fixed in CVS. Previous Comments: ------------------------------------------------------------------------ [2003-06-25 07:31:15] david at darville dot name Description: ------------ Even when safe mode is enabled, and open_basedir restrictions is in place, it is possible to use file_exists(), stat() (and fileperms()) on any file on the system. Reproduce code: --------------- $filename = "/etc/shadow"; if (file_exists($filename)) { echo "$filename exists\n"; } else { echo "$filename does not exist\n"; } $stat = stat($filename); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24333&edit=1

« previous php.bugs (#42497) next »