summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--auth/ssh.php2
-rw-r--r--utils.php2
2 files changed, 3 insertions, 1 deletions
diff --git a/auth/ssh.php b/auth/ssh.php
index 55f6e8a..27bcdaf 100644
--- a/auth/ssh.php
+++ b/auth/ssh.php
@@ -69,7 +69,7 @@ class SSH extends Authentication {
throw new Exception('Unknown type of connection for SSH.');
}
- if (!success) {
+ if (!$success) {
throw new Exception('SSH authentication failed.');
}
}
diff --git a/utils.php b/utils.php
index 20a8088..6ead112 100644
--- a/utils.php
+++ b/utils.php
@@ -62,6 +62,8 @@ function match_aspath_regex($aspath_regex) {
}
function log_to_file($log) {
+ global $config;
+
$log = '['.date("Y-m-d H:i:s").'] '.$log."\n";
file_put_contents($config['misc']['logs'], $log, FILE_APPEND | LOCK_EX);
}