php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5920 strange use of open_basedir string
Submitted: 2000-08-02 13:03 UTC Modified: 2005-03-31 16:13 UTC
From: karel at econnect dot cz Assigned:
Status: Wont fix Package: Other
PHP Version: 3.0.16 OS: Redhat 6.1
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
46 + 15 = ?
Subscribe to this entry?

 
 [2000-08-02 13:03 UTC] karel at econnect dot cz
Example from php3.ini:

open_basedir = /home/www/test/no_such_dir

If there is no subdirectory named no_such_dir 
on the filesystem, one would except that PHP does not 
allow to open any files. But PHP allows to open files 
within /home/www/test.

In other words PHP uses the longest substring from 
open_basedir that represents a valid directory name.

This can cause security problem.

I did not test doc_root or other similar lines in php3.ini, 
that could suffer the same problem.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-31 16:13 UTC] php-bugs at lists dot php dot net
We are sorry, but we do not support PHP 3 related problems anymore.
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Jan 31 08:03:45 2023 UTC