diff options
author | doktornotor <notordoktor@gmail.com> | 2015-07-30 09:56:13 +0200 |
---|---|---|
committer | doktornotor <notordoktor@gmail.com> | 2015-07-30 09:56:13 +0200 |
commit | 57608931de6d6781b087e4c6c3747a40f3d5380c (patch) | |
tree | b7a6a5eba5475991788b2a7b984add826ef20e70 /config | |
parent | fc1363d808840586fd7cd449a83c036fc2574fe0 (diff) | |
download | pfsense-packages-57608931de6d6781b087e4c6c3747a40f3d5380c.tar.gz pfsense-packages-57608931de6d6781b087e4c6c3747a40f3d5380c.tar.bz2 pfsense-packages-57608931de6d6781b087e4c6c3747a40f3d5380c.zip |
Fix the count and interval handling
Diffstat (limited to 'config')
-rw-r--r-- | config/mtr-nox11/mtr-nox11.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/mtr-nox11/mtr-nox11.xml b/config/mtr-nox11/mtr-nox11.xml index 61a7f4f8..396e860d 100644 --- a/config/mtr-nox11/mtr-nox11.xml +++ b/config/mtr-nox11/mtr-nox11.xml @@ -107,8 +107,8 @@ <custom_add_php_command> <![CDATA[ /* Do some basic input validation/sanitation here */ - $int_count = (is_numeric($_POST['count']) ? (int)$_POST['count'] : 10); - $int_interval = (is_numeric($_POST['interval']) ? (int)$_POST['interval'] : 1); + $int_count = (is_numeric($_POST['count']) ? (abs(intval($_POST['count']))) : 10); + $int_interval = (is_numeric($_POST['interval']) ? (abs(intval($_POST['interval']))) : 1); if (!is_hostname($_POST['hostname']) && !is_ipaddr($_POST['hostname'])) { echo "<div class=\"errmsg\">ERROR: No valid IP or Hostname given. Fix this and try again!</div>"; |