aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/mtr-nox11/mtr-nox11.xml4
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>";