Skip to content
Snippets Groups Projects
Commit bfcdaf06 authored by Angie Byron's avatar Angie Byron
Browse files

#1013058 by bfroehle: Fixed SSH connection class has wrong port in error string.

parent b9b661ef
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -17,7 +17,7 @@ function __construct($jail, $username, $password, $hostname = "localhost", $port ...@@ -17,7 +17,7 @@ function __construct($jail, $username, $password, $hostname = "localhost", $port
function connect() { function connect() {
$this->connection = @ssh2_connect($this->hostname, $this->port); $this->connection = @ssh2_connect($this->hostname, $this->port);
if (!$this->connection) { if (!$this->connection) {
throw new FileTransferException('SSH Connection failed to @host:@port', NULL, array('@host' => $this->hostname, '@port' => 21)); throw new FileTransferException('SSH Connection failed to @host:@port', NULL, array('@host' => $this->hostname, '@port' => $this->port));
} }
if (!@ssh2_auth_password($this->connection, $this->username, $this->password)) { if (!@ssh2_auth_password($this->connection, $this->username, $this->password)) {
throw new FileTransferException('The supplied username/password combination was not accepted.'); throw new FileTransferException('The supplied username/password combination was not accepted.');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment