Allow empty passphrase to be entered on no security. #208

Signed-off-by: D9ping <D9ping@users.noreply.github.com>
pull/1/head
D9ping 6 years ago
parent 2104f620bc
commit 9f5cf8a069

@ -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;
}

Loading…
Cancel
Save