Skip to content

Commit

Permalink
lib/Horde/Vfs/Ssh2.php: Use _sftp resource rather than a user@host:po…
Browse files Browse the repository at this point in the history
…rt string for creating the ssh2.sftp:// URL wrapper.
  • Loading branch information
sunweaver authored and mrubinsk committed Oct 3, 2020
1 parent 8f2aa85 commit 5a232f0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/Horde/Vfs/Ssh2.php
Expand Up @@ -865,11 +865,7 @@ protected function _recv($remote, $local)
*/
protected function _wrap($remote)
{
$wrapper = 'ssh2.sftp://' . $this->_params['username'] . ':'
. $this->_params['password'] . '@' . $this->_params['hostspec'];
if (!empty($this->_params['port'])) {
$wrapper .= ':' . $this->_params['port'];
}
$wrapper = 'ssh2.sftp://' . intval($this->_sftp);
if ($remote[0] != '/') {
$remote = $this->getCurrentDirectory() . '/' . $remote;
}
Expand Down

0 comments on commit 5a232f0

Please sign in to comment.