From 3a134b5369ea8fb5f429f5ce63391affef770bc2 Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Fri, 10 Sep 2010 14:35:39 -0600 Subject: [PATCH] Fix regular expression to allow 10 for ping count. --- usr/local/www/diag_ping.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/local/www/diag_ping.php b/usr/local/www/diag_ping.php index 4d00598800..0bbc7d59ab 100755 --- a/usr/local/www/diag_ping.php +++ b/usr/local/www/diag_ping.php @@ -64,8 +64,8 @@ if ($_POST || $_REQUEST['host']) { $host = $_REQUEST['host']; $interface = $_REQUEST['interface']; $count = $_POST['count']; - if (!preg_match('/^[0-9]{1}$/', $count) ) - $count = DEFAULT_COUNT; + if (preg_match('/[^0-9]/', $count) ) + $count = DEFAULT_COUNT; } } if (!isset($do_ping)) {