Apply WME input validation to all modes, not just hostap. Ticket #4516

This commit is contained in:
Chris Buechler 2015-03-13 03:06:36 -05:00
parent e4909df4de
commit 9b65fdd0ce

View File

@ -771,16 +771,16 @@ if ($_POST['apply']) {
if ($_POST['mode'] == 'hostap') {
$reqdfields[] = "ssid";
$reqdfieldsn[] = gettext("SSID");
if (stristr($_POST['standard'], '11n')) {
if (!($_POST['wme_enable'])) {
$input_errors[] = gettext("802.11n standards require enabling WME.");
}
}
if (isset($_POST['channel']) && $_POST['channel'] == "0") {
// auto channel with hostap is broken, prevent this for now.
$input_errors[] = gettext("A specific channel, not auto, must be selected for Access Point mode.");
}
}
if (stristr($_POST['standard'], '11n')) {
if (!($_POST['wme_enable'])) {
$input_errors[] = gettext("802.11n standards require enabling WME.");
}
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
check_wireless_mode();
if (isset($_POST['wpa_group_rekey']) && (!is_numericint($_POST['wpa_group_rekey']) || $_POST['wpa_group_rekey'] < 1 || $_POST['wpa_group_rekey'] > 9999)) {