diff options
-rwxr-xr-x | etc/sshd | 2 | ||||
-rwxr-xr-x | usr/local/www/services_captiveportal_mac.php | 10 | ||||
-rw-r--r-- | usr/local/www/system_advanced_admin.php | 2 | ||||
-rw-r--r-- | usr/local/www/widgets/widgets/system_information.widget.php | 9 |
4 files changed, 18 insertions, 5 deletions
@@ -94,7 +94,7 @@ $sshconf .= "ClientAliveInterval 30\n"; $sshconf .= "UseDNS no\n"; $sshconf .= "X11Forwarding no\n"; - if($config['system']['ssh']['sshdkeyonly'] <> "") { + if(isset($config['system']['ssh']['sshdkeyonly'])) { $sshconf .= "# Login via Key only\n"; $sshconf .= "PasswordAuthentication no\n"; $sshconf .= "ChallengeResponseAuthentication no\n"; diff --git a/usr/local/www/services_captiveportal_mac.php b/usr/local/www/services_captiveportal_mac.php index 828c9e5..38989a5 100755 --- a/usr/local/www/services_captiveportal_mac.php +++ b/usr/local/www/services_captiveportal_mac.php @@ -68,12 +68,16 @@ if ($_POST) { } if ($_POST['postafterlogin']) { - if (!is_array($a_passthrumacs)) + if (!is_array($a_passthrumacs)) { + echo "No entry exists yet!\n"; exit; + } if ($_POST['username']) { $mac = captiveportal_passthrumac_findbyname($_POST['username']); if (!empty($mac)) $_POST['delmac'] = $mac['mac']; + else + echo "No entry exists for this username: {$_POST['username']}\n"; } if ($_POST['delmac']) { $found = false; @@ -91,7 +95,9 @@ if ($_POST) { } unset($a_passthrumacs[$idx]); write_config(); - } + echo "The entry was sucessfully deleted\n"; + } else + echo "No entry exists for this mac address: {$_POST['delmac']}\n"; } exit; } diff --git a/usr/local/www/system_advanced_admin.php b/usr/local/www/system_advanced_admin.php index ca4cee3..bfa5061 100644 --- a/usr/local/www/system_advanced_admin.php +++ b/usr/local/www/system_advanced_admin.php @@ -412,7 +412,7 @@ function prot_change() { <?php if ($restart_sshd) { - killbyname(sshd); + killbyname("sshd"); log_error(gettext("secure shell configuration has changed. Stopping sshd.")); if ($config['system']['enablesshd']) { diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php index b395fc6..066133f 100644 --- a/usr/local/www/widgets/widgets/system_information.widget.php +++ b/usr/local/www/widgets/widgets/system_information.widget.php @@ -41,7 +41,14 @@ if($_REQUEST['getupdatestatus']) { $updater_url = "{$config['system']['firmware']['alturl']['firmwareurl']}"; else $updater_url = $g['update_url']; - download_file_with_progress_bar("{$updater_url}/version", "/tmp/{$g['product_name']}_version"); + + $nanosize = ""; + if ($g['platform'] == "nanobsd") { + $nanosize = "-nanobsd-" . strtolower(trim(file_get_contents("/etc/nanosize.txt"))); + } + + download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version"); + $remote_version = trim(@file_get_contents("/tmp/{$g['product_name']}_version")); if(empty($remote_version)) echo "<br /><br />Unable to check for updates."; |