Bug #53385 [NEW]: Phar stream wrapper can't handle escaped paths

From: Date: Tue, 23 Nov 2010 13:31:22 +0000
Subject: Bug #53385 [NEW]: Phar stream wrapper can't handle escaped paths
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-156316@lists.php.net to get a copy of this message
From: Operating system: debian PHP version: 5.3.3 Package: PHAR related Bug Type: Bug Bug description:Phar stream wrapper can't handle escaped paths 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 bug report at http://bugs.php.net/bug.php?id=53385&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53385&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53385&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53385&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53385&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53385&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53385&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53385&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53385&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53385&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53385&r=support Expected behavior: http://bugs.php.net/fix.php?id=53385&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53385&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53385&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53385&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53385&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53385&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53385&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53385&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53385&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53385&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53385&r=mysqlcfg

« previous php.bugs (#156316) next »