Update sanitize wifi_client_interface var

This commit is contained in:
billz 2023-04-07 12:32:01 +02:00
parent 7adbfe143d
commit 157f29b858

View file

@ -17,8 +17,9 @@ function DisplayWPAConfig()
if (isset($_POST['connect'])) {
$result = 0;
$iface = escapeshellarg($_SESSION['wifi_client_interface']);
$netid = intval($_POST['connect']);
exec('sudo wpa_cli -i ' . $_SESSION['wifi_client_interface'] . ' select_network ' . $netid);
exec('sudo wpa_cli -i ' . $iface . ' select_network ' . $netid);
$status->addMessage('New network selected', 'success');
} elseif (isset($_POST['wpa_reinit'])) {
$status->addMessage('Reinitializing wpa_supplicant', 'info', false);