Input sanitization for wpa client

This commit is contained in:
billz 2023-04-03 15:20:01 +02:00
parent ce7e84ec61
commit a07be6e3bd
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ function DisplayWPAConfig()
if (isset($_POST['connect'])) {
$result = 0;
$iface = escapeshellarg($_SESSION['wifi_client_interface']);
$netid = escapeshellarg(strval($_POST['connect']));
$netid = intval($_POST['connect']);
if (is_numeric($netid)) {
exec('sudo wpa_cli -i ' . $iface . ' select_network ' . $netid);
$status->addMessage('New network selected', 'success');