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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
35 - 2 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 23:01:34 2024 UTC