mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-21 23:20:22 +00:00
Input sanitization for wpa client, Fix for #1325
This commit is contained in:
parent
592bce02bf
commit
30e35574a1
1 changed files with 3 additions and 1 deletions
|
@ -17,7 +17,9 @@ function DisplayWPAConfig()
|
|||
|
||||
if (isset($_POST['connect'])) {
|
||||
$result = 0;
|
||||
exec('sudo wpa_cli -i ' . $_SESSION['wifi_client_interface'] . ' select_network '.strval($_POST['connect']));
|
||||
$iface = escapeshellarg($_SESSION['wifi_client_interface']);
|
||||
$netid = escapeshellarg(strval($_POST['connect']));
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue