From 61ba386b8bb36ebcc93f1dd51914270f5904fef8 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 10 Sep 2010 15:30:11 -0400 Subject: [PATCH] Ensure count is valid. Submitted-by: Josh Little --- usr/local/www/diag_ping.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr/local/www/diag_ping.php b/usr/local/www/diag_ping.php index 489cab667a..4d00598800 100755 --- a/usr/local/www/diag_ping.php +++ b/usr/local/www/diag_ping.php @@ -63,7 +63,9 @@ if ($_POST || $_REQUEST['host']) { $do_ping = true; $host = $_REQUEST['host']; $interface = $_REQUEST['interface']; - $count = $_REQUEST['count']; + $count = $_POST['count']; + if (!preg_match('/^[0-9]{1}$/', $count) ) + $count = DEFAULT_COUNT; } } if (!isset($do_ping)) {