MFB: Bug #7646
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 29 Jun 2010 04:52:01 +0000 (22:52 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 29 Jun 2010 04:52:05 +0000 (22:52 -0600)
Submitted by: Valentin.Vidic@CARNet.hr
Allow access to files with multiple consecutive dots in the name

Revision   Changes    Path
1.1.2.7    +4 -2      framework/VFS/lib/VFS/file.php
1.36.4.35  +2 -1      framework/VFS/package.xml

framework/VFS/lib/VFS/file.php
framework/VFS/package.xml

index 5367b97..fa31bc9 100644 (file)
@@ -657,7 +657,9 @@ class VFS_file extends VFS
     {
         $name = basename($name);
         if (strlen($name)) {
-            $name = str_replace('..', '', $name);
+            if ($name == '..') {
+                $name = '';
+            }
             if (substr($name, 0, 1) != '/') {
                 $name = '/' . $name;
             }
index 1d75c95..fa03a43 100644 (file)
@@ -128,7 +128,8 @@ Reading, writing and listing of files are all supported, and there are both obje
     <api>beta</api>
    </stability>
    <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
-   <notes>* Rename fixes for SMB driver (leena.heino@uta.fi, Horde Bug #7933).
+   <notes>* Allow access to files with multiple consecutive dots in the name (valentin.vidic@carnet.hr; Horde Bug #7646).
+* Rename fixes for SMB driver (leena.heino@uta.fi, Horde Bug #7933).
 * Set LC_TIME to C for consistency in date parsing in the SSH2 backend (michael-dev@fami-braun.de, Horde Bug #6396)
 * Pass -n for numeric UIDs/GIDs in the SSH2 backend when mapping to local user ids (Horde Request #6579)
 * Fix readByteRange() (wrong method name) in SQL backend