#38963 [Opn->Fbk]: tempnam bypasses open_basedir
| From: | tony2001@php.net | Date: | Tue, 26 Sep 2006 15:30:39 +0000 |
| Subject: | #38963 [Opn->Fbk]: tempnam bypasses open_basedir | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-102720@lists.php.net to get a copy of this message | ||
ID: 38963
Updated by: tony2001@php.net
Reported By: manuel at mausz dot at
-Status: Open
+Status: Feedback
Bug Type: Filesystem function related
Operating System: Linux/Gentoo
PHP Version: 4.4.4
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Cannot reproduce:
# ./sapi/cli/php -r 'var_dump(tempnam(false, "temp"));'
Warning: tempnam(): open_basedir restriction in effect. File() is not
within the allowed path(s): (/www) in Command line code on line 1
bool(false)
Previous Comments:
------------------------------------------------------------------------
[2006-09-26 15:19:47] manuel at mausz dot at
Description:
------------
tempnam bypasses open_basedir if dir = false
Reproduce code:
---------------
<?php $tempfile = tempnam(false, "phptest"); ?>
Expected result:
----------------
Warning: tempnam() [function.tempnam]: open_basedir restriction in
effect. File(/tmp) is not within the allowed path(s): (...) in
Actual result:
--------------
# ls /tmp/phptest*
/tmp/phptestt4mIOa
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38963&edit=1