From c050ecdaea3efbc865503742a3ea77e3cc32b241 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 10 Sep 2010 15:32:12 -0400 Subject: Ensure count is valid. Submitted-by: Josh Little --- usr/local/www/diag_ping.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr/local/www/diag_ping.php b/usr/local/www/diag_ping.php index e6da1db..2be8c6e 100755 --- a/usr/local/www/diag_ping.php +++ b/usr/local/www/diag_ping.php @@ -52,6 +52,8 @@ if ($_POST) { $host = $_POST['host']; $interface = $_POST['interface']; $count = $_POST['count']; + if (!preg_match('/^[0-9]{1}$/', $count) ) + $count = DEFAULT_COUNT; } } if (!isset($do_ping)) { -- cgit v1.1