Summary | ssh2 implementation of VFS should quote whitespace pathnames with ssh2_exec |
Queue | Horde Framework Packages |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | jan (at) horde (dot) org |
Requester | herde (at) tu-harburg (dot) de |
Created | 02/07/2008 (6360 days ago) |
Due | |
Updated | 02/16/2008 (6351 days ago) |
Assigned | 02/09/2008 (6358 days ago) |
Resolved | 02/16/2008 (6351 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
425c425
< $stream = @ssh2_exec($this->_stream, "ls -al $path");
---
".escapeshellarg($path));
< $stream = @ssh2_exec($this->_stream, "ls -l $path");
---
".escapeshellarg($path));
New Attachment: debugging.png
smaler in size - i hope this will help
shows the output of the error substream while trying to list the
contents of a path named '/smb/rztmh/h/1b/rztmh/windows/My Documents'.
Assigned to Jan Schneider
State ⇒ Assigned
State ⇒ Feedback
yet - do any other developers have it available to look at this?
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ ssh2 implementation of VFS should quote whitespace pathnames with ssh2_exec
Queue ⇒ Horde Framework Packages
State ⇒ Unconfirmed
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.