mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Merge pull request #1326 from eldstal/master
Input sanitization for wpa client, Fix for #1325
This commit is contained in:
commit
ce7e84ec61
@ -17,8 +17,12 @@ function DisplayWPAConfig()
|
||||
|
||||
if (isset($_POST['connect'])) {
|
||||
$result = 0;
|
||||
exec('sudo wpa_cli -i ' . $_SESSION['wifi_client_interface'] . ' select_network '.strval($_POST['connect']));
|
||||
$status->addMessage('New network selected', 'success');
|
||||
$iface = escapeshellarg($_SESSION['wifi_client_interface']);
|
||||
$netid = escapeshellarg(strval($_POST['connect']));
|
||||
if (is_numeric($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);
|
||||
$force_remove = true;
|
||||
|
Loading…
Reference in New Issue
Block a user