From 21da37712bd51d8c948373559b612fdd1eb5b969 Mon Sep 17 00:00:00 2001 From: Bill Zimmerman Date: Wed, 5 Jan 2022 11:19:40 +0100 Subject: [PATCH] Fix: assign iw reg cc value if empty --- includes/hostapd.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/includes/hostapd.php b/includes/hostapd.php index 6d11064c..812d81ee 100755 --- a/includes/hostapd.php +++ b/includes/hostapd.php @@ -90,7 +90,7 @@ function DisplayHostAPDConfig() $arrConfig['disassoc_low_ack_bool'] = 1; } // assign country_code from iw reg if not set in config - if (!isset($arrConfig['country_code']) && isset($country_code[0])) { + if (empty($arrConfig['country_code']) && isset($country_code[0])) { $arrConfig['country_code'] = $country_code[0]; } // set txpower with iw if value is non-default ('auto') @@ -225,7 +225,6 @@ function SaveHostAPDConfig($wpa_array, $enc_types, $modes, $interfaces, $status) // Verify input if (empty($_POST['ssid']) || strlen($_POST['ssid']) > 32) { - // Not sure of all the restrictions of SSID $status->addMessage('SSID must be between 1 and 32 characters', 'danger'); $good_input = false; } @@ -255,8 +254,6 @@ function SaveHostAPDConfig($wpa_array, $enc_types, $modes, $interfaces, $status) } if (! in_array($_POST['interface'], $interfaces)) { - // The user is probably up to something here but it may also be a - // genuine error. $status->addMessage('Unknown interface '.htmlspecialchars($_POST['interface'], ENT_QUOTES), 'danger'); $good_input = false; }