|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11566 It appears most functions don't check open_basedir
Submitted: 2001-06-19 13:35 UTC Modified: 2005-01-31 22:45 UTC
From: henry at metroweb dot co dot za Assigned:
Status: Closed Package: Safe Mode/open_basedir
PHP Version: 4.0.5 OS: linux
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.
Block user comment
Status: Assign to:
Bug Type:
From: henry at metroweb dot co dot za
New email:
PHP Version: OS:


 [2001-06-19 13:35 UTC] henry at metroweb dot co dot za
It appears most functions that accept path/filename args don't check open_basedir.  The following code needs to be added to many functions after the convert_to_string_ex function call:

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

where 'filename' could of course change.

(this check is typically inserted before the safe_mode check since safe_mode is often not used because of it's limiting factor for ISPs)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-07 01:36 UTC]
All of the safe_mode/open_basedir functionality will eventually be redesigned

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Sep 28 08:03:36 2021 UTC