Skip to content

Commit

Permalink
Firewall:Util - php 8 fix (#6040)
Browse files Browse the repository at this point in the history
  • Loading branch information
kulikov-a committed Sep 19, 2022
1 parent 5bf6256 commit 6c82c41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/opnsense/mvc/app/library/OPNsense/Firewall/Util.php
Expand Up @@ -71,7 +71,7 @@ public static function isSubnet($network)
{
$tmp = explode('/', $network);
if (count($tmp) == 2) {
if (self::isIpAddress($tmp[0]) && abs($tmp[1]) == $tmp[1] && ctype_digit($tmp[1])) {
if (self::isIpAddress($tmp[0]) && ctype_digit($tmp[1]) && abs($tmp[1]) == $tmp[1]) {
if (strpos($tmp[0], ':') !== false && $tmp[1] <= 128) {
// subnet v6
return true;
Expand Down

0 comments on commit 6c82c41

Please sign in to comment.