From f3088300950f9088b7fe8500cff8ca70a3ed982c Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Sat, 10 Dec 2016 20:16:23 +0100 Subject: [PATCH] Some fixes --- index.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 6e3b3b4..870258b 100644 --- a/index.php +++ b/index.php @@ -1,9 +1,8 @@ $machine) { if ( - (isset($machine['network']) && isset($networks[$machine['network']]) && $networks[$machine['network']]['secure'] == 'true') - || ($network && in_array($machine['network'], $network['allowed'])) + ( + isset($machine['network']) + && isset($networks[$machine['network']]) + ) && ( + ( + $networks[$machine['network']]['secure'] == 'true' + ) || ( + $network + && isset($network['allowed']) + && in_array($machine['network'], $network['allowed']) + ) + ) ) { if (isset($machine['userkey']) && preg_match($SSH_KEY_REGEX, $machine['userkey'], $matches)) { $t .= $matches[0].' '.$machineName.'@'.($machine['network'] ? $machine['network'].'.' : '').$DOMAIN."\n";