mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Update sanitize var method
This commit is contained in:
parent
1e52ff598b
commit
7760a1d7cb
@ -98,15 +98,16 @@ function DisplayHostAPDConfig()
|
|||||||
$arrConfig['country_code'] = $country_code[0];
|
$arrConfig['country_code'] = $country_code[0];
|
||||||
}
|
}
|
||||||
// set txpower with iw if value is non-default ('auto')
|
// set txpower with iw if value is non-default ('auto')
|
||||||
$txpower = escapeshellarg($_POST['txpower']);
|
if (isset($_POST['txpower']) && ($_POST['txpower'] != 'auto')) {
|
||||||
$interface = escapeshellarg($_POST['interface']);
|
$txpower = intval($_POST['txpower']);
|
||||||
if ($txpower) && ($txpower != 'auto')) {
|
$sdBm = $txpower * 100;
|
||||||
$sdBm = $txpower * 100;
|
exec('sudo /sbin/iw dev '.escapeshellarg($_POST['interface']).' set txpower fixed '.$sdBm, $return);
|
||||||
exec('sudo /sbin/iw dev '.$interface.' set txpower fixed '.$sdBm, $return);
|
$status->addMessage('Setting transmit power to '.$_POST['txpower'].' dBm.', 'success');
|
||||||
$status->addMessage('Setting transmit power to '.$txpower.' dBm.', 'success');
|
$txpower = $_POST['txpower'];
|
||||||
} elseif ($txpower == 'auto') {
|
} elseif ($_POST['txpower'] == 'auto') {
|
||||||
exec('sudo /sbin/iw dev '.$interface.' set txpower auto', $return);
|
exec('sudo /sbin/iw dev '.escapeshellarg($_POST['interface']).' set txpower auto', $return);
|
||||||
$status->addMessage('Setting transmit power to '.$txpower.'.', 'success');
|
$status->addMessage('Setting transmit power to '.$_POST['txpower'].'.', 'success');
|
||||||
|
$txpower = $_POST['txpower'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$countries_5Ghz_max48ch = RASPI_5GHZ_ISO_ALPHA2;
|
$countries_5Ghz_max48ch = RASPI_5GHZ_ISO_ALPHA2;
|
||||||
|
Loading…
Reference in New Issue
Block a user