Doc #53687 [Com]: Use of colon character in open_basedir paths
| From: | luckyluke at softhome dot net | Date: | Tue, 05 Feb 2013 11:29:12 +0000 |
| Subject: | Doc #53687 [Com]: Use of colon character in open_basedir paths | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-9506@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=53687&edit=1
ID: 53687
Comment by: luckyluke at softhome dot net
Reported by: luckyluke at softhome dot net
Summary: Use of colon character in open_basedir paths
Status: Feedback
Type: Documentation Problem
Package: Safe Mode/open_basedir
Operating System: linux-2.6 x86_64
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
Additionally, if you have colons in intermediate elements of a path, like this:
/www/foo:80/bar
and you specify an open_basedir like "/www" or "/www/", PHP will block any
access
to the above path.
Unfortunately I cannot, at the moment, test this on recent versions of PHP and/or
ones without Suhosin installed, but it does replicate perfectly on my PHP-
5.3.15+Suhosin-0.9.33 system.
Previous Comments:
------------------------------------------------------------------------
[2013-02-05 11:00:51] luckyluke at softhome dot net
I was just giving an example. Anyway I did actually try to escape colons with
backslashes, and I re-tried now on PHP 5.3.15, without success.
------------------------------------------------------------------------
[2011-01-25 20:25:48] philip@php.net
Can you please test that escaping mechanism? Maybe you could also test it within
PATH itself
------------------------------------------------------------------------
[2011-01-07 17:51:25] luckyluke at softhome dot net
Description:
------------
Documentation says that on *nix systems open_basedir paths must be separated by
colon characters, but it does not say if it is possible and how to include a path
containing an actual colon (which is a perfectly valid path on linux, for
example).
How can I add /foo:bar to open_basedir?
Expected result:
----------------
I should be able to know if and how to escape the separator colon, for example
with
open_basedir = /www\:80:/somewhere_else
to add the two directories '/www:80' and'/somewhere_else'.
Documentation should tell me I cannot use colons in paths, or tell me how I can
use them.
(besides, if there isn't any escape possibility it should be added IMHO)
Actual result:
--------------
Adding a path with a colon inside gets interpreted as two different paths.
Official documentation does not help on the matter.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=53687&edit=1