php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64496 Runkit_Sandbox open_basedir doesn't support multiple paths
Submitted: 2013-03-23 08:38 UTC Modified: 2013-04-04 08:30 UTC
From: davey@php.net Assigned: pollita (profile)
Status: Closed Package: runkit (PECL)
PHP Version: 5.5Git-2013-03-23 (Git) OS: OSX 10.8.3
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:
Package:
Bug Type:
Summary:
From: davey@php.net
New email:
PHP Version: OS:

 

 [2013-03-23 08:38 UTC] davey@php.net
Description:
------------
Unlike the standard open_basedir, Runkit_Sandbox does not support multiple paths 
separated by the PATH_SEPARATOR (e.g. "/foo:/bar")

Test script:
---------------
<?php
$sandbox = new Runkit_Sandbox(
    array(
        "open_basedir" => sys_get_temp_dir() . PATH_SEPARATOR .getcwd()
    )
);

$sandbox->eval('var_dump(ini_get("open_basedir"));'); // string(1) "" (== chr(1))

// vs.

$sandbox = new Runkit_Sandbox(
    array(
        "open_basedir" => sys_get_temp_dir()
    )
);
$sandbox->eval('var_dump(ini_get("open_basedir"));'); // string(4) "/tmp"

Expected result:
----------------
The same as with regular PHP, that both (any number of) paths is accessible, and 
any paths below them, but none above.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-04-04 08:30 UTC] pollita@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: pollita
 [2013-04-04 08:30 UTC] pollita@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 13:01:29 2024 UTC