summaryrefslogtreecommitdiffstats
path: root/usr/local/www/diag_ping.php
diff options
context:
space:
mode:
authorThomas Rieschl <thomas@trinet.at>2013-02-26 16:14:43 +0100
committerThomas Rieschl <thomas@trinet.at>2013-02-26 16:14:43 +0100
commite700d2ee1b327b4a4eb71324fe75737fc2ac0c96 (patch)
tree51306a002bb40df5fa9eac6f130ec84aa8737015 /usr/local/www/diag_ping.php
parent91cf9401c702288528122fe7b9aec56fc1a53566 (diff)
downloadpfsense-e700d2ee1b327b4a4eb71324fe75737fc2ac0c96.zip
pfsense-e700d2ee1b327b4a4eb71324fe75737fc2ac0c96.tar.gz
trim whitespace from ping host
Added trim() function to the $host variable. If whitespace is in front of the host or IP address the ping command will fail.
Diffstat (limited to 'usr/local/www/diag_ping.php')
-rwxr-xr-xusr/local/www/diag_ping.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/www/diag_ping.php b/usr/local/www/diag_ping.php
index d7efdcc..a84810e 100755
--- a/usr/local/www/diag_ping.php
+++ b/usr/local/www/diag_ping.php
@@ -61,7 +61,7 @@ if ($_POST || $_REQUEST['host']) {
if (!$input_errors) {
$do_ping = true;
- $host = $_REQUEST['host'];
+ $host = trim($_REQUEST['host']);
$interface = $_REQUEST['interface'];
$count = $_POST['count'];
if (preg_match('/[^0-9]/', $count) )
OpenPOWER on IntegriCloud