diff --git a/src/opnsense/mvc/app/library/OPNsense/Firewall/Util.php b/src/opnsense/mvc/app/library/OPNsense/Firewall/Util.php index db8726c69..0dc218190 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Firewall/Util.php +++ b/src/opnsense/mvc/app/library/OPNsense/Firewall/Util.php @@ -195,8 +195,9 @@ class Util $tmp = explode(':', $number); foreach ($tmp as $port) { if (!getservbyname($port, "tcp") && !getservbyname($port, "udp") - && filter_var($port, FILTER_VALIDATE_INT, array( - "options" => array("min_range"=>1, "max_range"=>65535))) === false + && (filter_var($port, FILTER_VALIDATE_INT, array( + "options" => array("min_range"=>1, "max_range"=>65535)) + ) === false || !is_numeric($port)) ) { return false; }