php.net |  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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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)


Patches

Pull Requests

History

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

-Jason
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jan 05 03:01:28 2025 UTC