From 9f5cf8a069b9984e83377302fa82f6333e94c4cc Mon Sep 17 00:00:00 2001 From: D9ping Date: Sun, 14 Oct 2018 03:21:17 +0200 Subject: [PATCH] Allow empty passphrase to be entered on no security. #208 Signed-off-by: D9ping --- includes/hostapd.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/hostapd.php b/includes/hostapd.php index d85d2184..20224812 100755 --- a/includes/hostapd.php +++ b/includes/hostapd.php @@ -546,7 +546,8 @@ function SaveHostAPDConfig($wpa_array, $enc_types, $modes, $interfaces, $status) $good_input = false; } - if (strlen($_POST['wpa_passphrase']) < 8 || strlen($_POST['wpa_passphrase']) > 63) { + if ($_POST['wpa'] !== 'none' && + (strlen($_POST['wpa_passphrase']) < 8 || strlen($_POST['wpa_passphrase']) > 63)) { $status->addMessage('WPA passphrase must be between 8 and 63 characters', 'danger'); $good_input = false; }