From 6bfb3a3c9d0ed2127ff7f5e0f25f06c29f706cb1 Mon Sep 17 00:00:00 2001 From: billz Date: Sat, 1 May 2021 17:46:53 +0100 Subject: [PATCH] Add escapeshellarg() for iwgetid interface --- includes/hostapd.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/hostapd.php b/includes/hostapd.php index e364dd15..4d18ba9e 100755 --- a/includes/hostapd.php +++ b/includes/hostapd.php @@ -59,9 +59,8 @@ function DisplayHostAPDConfig() } } } - exec('cat '. RASPI_HOSTAPD_CONFIG, $hostapdconfig); - exec('iwgetid '. $_POST['interface']. ' -r', $wifiNetworkID); + exec('iwgetid '. escapeshellarg($_POST['interface']). ' -r', $wifiNetworkID); if (!empty($wifiNetworkID[0])) { $managedModeEnabled = true; }