diff options
author | Thomas Rieschl <thomas@trinet.at> | 2013-02-26 16:14:43 +0100 |
---|---|---|
committer | Thomas Rieschl <thomas@trinet.at> | 2013-02-26 16:14:43 +0100 |
commit | e700d2ee1b327b4a4eb71324fe75737fc2ac0c96 (patch) | |
tree | 51306a002bb40df5fa9eac6f130ec84aa8737015 | |
parent | 91cf9401c702288528122fe7b9aec56fc1a53566 (diff) | |
download | pfsense-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.
-rwxr-xr-x | usr/local/www/diag_ping.php | 2 |
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) ) |