Fix error with no password

This commit is contained in:
Michel Roux 2014-07-15 08:56:55 +02:00
parent 4923095ea1
commit 910b6c6cdb

View File

@ -5,7 +5,7 @@ require_once 'config.php';
require_once 'utils.php'; require_once 'utils.php';
require_once 'Net/SSH2.php'; require_once 'Net/SSH2.php';
require_once 'Crypt/RSA.php'; require_once 'Crypt/RSA.php';
global $servers; global $servers, $config;
$gitstatus = 'git fetch && git status'; $gitstatus = 'git fetch && git status';
if (!empty($_POST['section'])) { if (!empty($_POST['section'])) {
@ -33,7 +33,7 @@ if (!empty($_POST['action'])) {
$session->login($config['user'], $key); $session->login($config['user'], $key);
} }
} }
if (!$session->isConnected()) { if (!$session->isConnected() && isset($config['pass'])) {
$session->login($config['user'], $config['pass']); $session->login($config['user'], $config['pass']);
} }