#36297 [Fbk->Opn]: Bypass open_basedir on windows

From: Date: Sun, 05 Feb 2006 19:25:40 +0000
Subject: #36297 [Fbk->Opn]: Bypass open_basedir on windows
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-92952@lists.php.net to get a copy of this message
ID: 36297 User updated by: smartgenius1 at yahoo dot com Reported By: smartgenius1 at yahoo dot com -Status: Feedback +Status: Open Bug Type: Safe Mode/open_basedir Operating System: Windows PHP Version: 5.1.2 New Comment: I have it set to "." Previous Comments: ------------------------------------------------------------------------ [2006-02-05 20:24:48] tony2001@php.net What is the value of open_basedir? ------------------------------------------------------------------------ [2006-02-05 19:13:21] smartgenius1 at yahoo dot com I was also able to unlink() files; and also fwrite() things as well. I had full permissions; as if I was working in ./ and no error ever occured. ------------------------------------------------------------------------ [2006-02-05 18:42:07] smartgenius1 at yahoo dot com Description: ------------ The function chdir() does NOT obey the open_basedir restriction on windows. Chdir() ONLY checks the UID of the directories; and on Windows there are no UIDs. So it is possible to do chdir("../"); and it works on windows; even if the open_basedir restriction is set to "."; which should be blocking it. And to make sure I had open_basedir restriction configured correctly; I tried this: opendir("../"); and sure enough; an error stating that the restriction was on. Reproduce code: --------------- <? chdir("../"); ?> Expected result: ---------------- A PHP error stating that the open_basedir restriction was on Actual result: -------------- It worked. No errors at all; and I was able to open the directory with opendir(getcwd()); after changing the current working directory to the above directory. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36297&edit=1

« previous php.bugs (#92952) next »