[Tickets #6227] ssh2 implementation of VFS should quote whitespace pathnames with ssh2_exec

bugs at horde.org bugs at horde.org
Thu Feb 7 12:57:46 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=6227
-----------------------------------------------------------------------
 Ticket             | 6227
 Created By         | herde at tu-harburg.de
 Summary            | ssh2 implementation of VFS should quote whitespace pathnames with
                    | ssh2_exec
 Queue              | Horde Framework Packages
 Version            | HEAD
 Type               | Bug
 State              | Unconfirmed
 Priority           | 2. Medium
 Milestone          | 
 Patch              | 
 Owners             | 
-----------------------------------------------------------------------


herde at tu-harburg.de (2008-02-07 07:57) wrote:

When we try to list the contents of an imported windows folder from a
SSH2-Server (unix) and its pathname contains any whitespace characters we
get an exhausted session memory and a blank page as result.

As far as i could figure out this is due to these lines of code:
VFS/ssh2.php Line 425 (ls -al) or 428 (ls -l) 

$stream = @ssh2_exec($this->_stream, 'ls -al');

I wrote a little test script and looked onto the error substream which
told me: 

"No such file or directory: /path !" 

if i try to execute a 'ls -l /path with whitespace'

if i do the same but quoting whitespace ('\ ') the code works fine  -
but it really should check for error messages and quote pathnames if
nessessary ....

The exhausted session memory is produced afterwards when trying to read
(blocked) from this stream and waiting for an EOF which results in an
endless loop until the memory limit is reached.

 



More information about the bugs mailing list