1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Input sanitization for wpa client

This commit is contained in:
billz 2023-04-03 15:20:01 +02:00
parent ce7e84ec61
commit a07be6e3bd

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');