[gollem] VFS_smb.php Directory Listing broken

Michael Herde herde at tu-harburg.de
Fri May 29 11:31:50 UTC 2009


Horde 3.3.4 with Gollem H3 (1.1) - we found out that

VFS_smb.php (v 1.1.2.2)  line 385 ff of function listFolder()

                 // Split into columns at every six spaces
                 $split1 = preg_split('/\s{6,}/', trim($res[$r]));
                 // If the file name isn't . or ..

turns out a broken directory listing if there is a long filename in  
conjunction with more than one Attribute setted (i.e. DA) because  
there are less than 6 expected spaces between the name of the item and  
the attribute list. the attribute list is more the one entry in this  
case. Only if we hafe 6 or more spaces in between here the regex will  
match correctly.

Example output of manualy listing of smbclient:
smb: \1b\rztmh\windows\test\> ls
   .                                   D        0  Wed May 27 15:18:42 2009
   ..                                  D        0  Thu May 28 16:04:56 2009
   SystemHiddenReadonlyArchive     DAHSR        0  Wed May 27 14:17:21 2009
   Ein ziemlich langer Ordner mit vielen Buchstaben, der nicht kurz  
ist      D        0  Wed May 27 14:14:11 2009
   Eine ziemlich lange Datei mit vielen Buchstaben, die nicht kurz  
ist.txt      A        0  Wed May 27 14:14:42 2009
   Ordner mit Sonderzeichen & ( ) _ - toll      D        0  Wed May 27  
14:15:05 2009
   Datei mit SOnderzeichen ¿ ? § µ ° juhuuu.txt      A        0  Wed  
May 27 14:15:38 2009
   SystemHiddenReadonlyArchive.txt   AHSR        0  Wed May 27 14:16:32 2009
   SystemHiddenReadonlyArchive.txte    AHR       31  Wed May 27 15:18:42 2009

                 49152 blocks of size 65536. 2 blocks available


turns out this strange broken directory listing
   "SystemHiddenReadonlyArchive     DAHSR"     0  Wed May 27 14:17:21 2009
as to see in the attached screenshot.

I'm not shure wether this is buggy or is it due to the settings of the  
smbclient command line or environment. Any advice ?? Or should i post
it as a bug ? The regex should match the attribute column [DHARS] in  
an appropriate way.

Michael Herde




freundliche Grüsse
Michael Herde





-----
Anhänge (Die Links sind bis zum 30.06.2009 gültig)
https://webmail.tu-harburg.de/horde/imp/attachment.php?u=rztmh&t=1243596710&f=brokendirectorylistinggollem.bmp



More information about the gollem mailing list