php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11563 FileFunction macro in filestat.c appears to be missing a check (fix included)
Submitted: 2001-06-19 12:16 UTC Modified: 2005-01-31 23:15 UTC
From: henry at metroweb dot co dot za Assigned:
Status: Closed Package: Safe Mode/open_basedir
PHP Version: 4.0.5 OS: linux 245
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: henry at metroweb dot co dot za
New email:
PHP Version: OS:

 

 [2001-06-19 12:16 UTC] henry at metroweb dot co dot za
safe_mode off
open_basedir in effect
disable_functions=system exec passthru chmod,...etc...

For ISPs safe_mode is too limiting; we use open_basedir extensively.  However, many is_* functions and all function calls which use the FileFunction macro in filestat.c ignore the open_basedir restriction completely (the only way around this of course is to disable all those useful funcs).

Fix follows:

Add this line after convert_to_string_ex(filename); \ in filestat.c (about line 628):

if (php_check_open_basedir((*filename)->value.str.val)) RETURN_FALSE; \


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-20 13:18 UTC] mfischer@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Sep 27 18:01:26 2020 UTC