Bug #53385 [Fbk->NoF]: Phar stream wrapper can't handle escaped paths

From: Date: Mon, 18 Feb 2013 00:34:36 +0000
Subject: Bug #53385 [Fbk->NoF]: Phar stream wrapper can't handle escaped paths
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-176939@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=53385&edit=1

 ID:               53385
 Updated by:       php-bugs@lists.php.net
 Reported by:      michel dot hartmann at mayflower dot de
 Summary:          Phar stream wrapper can't handle escaped paths
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          PHAR related
 Operating System: debian
 PHP Version:      5.3.3

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2011-08-29 20:00:31] bjori@php.net

Why do you expect be able to access files within a .phar using urlencoded spaces?

I can't do that on my normal filesystem either..

------------------------------------------------------------------------
[2010-11-23 14:31:20] michel dot hartmann at mayflower dot de

Description:
------------
If you have a .phar in a directory that contains spaces (e.g. "/some/path with
spaces/example.phar") it is not possible to read files in that phar using their full and
escaped path (e.g. "phar:///some/path%20with%20spaces/example.phar/README").

This got to my attention since simplexml_load_file always escapes the provided paths.




Test script:
---------------
<?php
$readme = file_get_contents('phar:///some/path%20with%20spaces/example.phar/README');

Expected result:
----------------
$readme contains data from "phar:///some/path with spaces/example.phar/README"

Actual result:
--------------
PHP Warning:  file_get_contents(phar:///some/path%20with%20spaces/example.phar/README): failed to
open stream: phar error: invalid url or non-existent phar
"phar:///some/path%20with%20spaces/example.phar/README" in *** on line 2


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=53385&edit=1


Thread (3 messages)

« previous php.bugs (#176939) next »