|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
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: Sat Jul 24 12:01:23 2021 UTC