aboutsummaryrefslogtreecommitdiffstats
path: root/config/iperf.xml
diff options
context:
space:
mode:
Diffstat (limited to 'config/iperf.xml')
-rw-r--r--config/iperf.xml15
1 files changed, 7 insertions, 8 deletions
diff --git a/config/iperf.xml b/config/iperf.xml
index f64500d9..3b17f549 100644
--- a/config/iperf.xml
+++ b/config/iperf.xml
@@ -150,13 +150,12 @@
$iperf_options = "";
if($_POST['protocol'] == "udp") $iperf_options .= " -u";
if($_POST['format'] == "bytes") $iperf_options .= " -f A";
- if($_POST['interval'] != "") $iperf_options .= " -i {$_POST['interval']}";
- if($_POST['length'] != "") $iperf_options .= " -l {$_POST['length']}";
- if($_POST['window'] != "") $iperf_options .= " -w {$_POST['window']}";
- if($_POST['udpbandwidth'] != "") $iperf_options .= " -b {$_POST['udpbandwidth']}";
- if($_POST['port'] != "") $iperf_options .= " -p {$_POST['port']}";
- $iperf_options .= " -c {$_POST['hostname']}";
+ if($_POST['interval'] != "") $iperf_options .= " -i " . escapeshellarg($_POST['interval']);
+ if($_POST['length'] != "") $iperf_options .= " -l " . escapeshellarg($_POST['length']);
+ if($_POST['window'] != "") $iperf_options .= " -w " . escapeshellarg($_POST['window']);
+ if($_POST['udpbandwidth'] != "") $iperf_options .= " -b " . escapeshellarg($_POST['udpbandwidth']);
+ if($_POST['port'] != "") $iperf_options .= " -p " . escapeshellarg($_POST['port']);
+ $iperf_options .= " -c " . escapeshellarg($_POST['hostname']);
system("/usr/local/bin/iperf" . $iperf_options);
</custom_add_php_command>
-</packagegui>
-
+</packagegui> \ No newline at end of file