From 07ca2900a11d02bf0b925b3d6fb0df6cd9613067 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 26 Nov 2019 13:14:14 +0000 Subject: [PATCH] Omit wpa_pasphrase is sec type = none. Resolves #439 --- includes/hostapd.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/hostapd.php b/includes/hostapd.php index 53c6362f..c76bb612 100755 --- a/includes/hostapd.php +++ b/includes/hostapd.php @@ -191,7 +191,9 @@ function SaveHostAPDConfig($wpa_array, $enc_types, $modes, $interfaces, $status) $config.= 'hw_mode='.$_POST['hw_mode'].PHP_EOL; $config.= 'ieee80211n=0'.PHP_EOL; } - $config.= 'wpa_passphrase='.$_POST['wpa_passphrase'].PHP_EOL; + if ($_POST['wpa'] !== 'none') { + $config.= 'wpa_passphrase='.$_POST['wpa_passphrase'].PHP_EOL; + } if ($wifiAPEnable == 1) { $config.= 'interface=uap0'.PHP_EOL; } else {