Skip to content

Commit

Permalink
Do not match IP address not formatted as strings
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazoyer committed Jun 15, 2020
1 parent a21b924 commit caa254e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/utils.php
Expand Up @@ -69,7 +69,7 @@ function match_reserved_ip_range($ip) {
function match_ipv6($ip, $ip_only = true) {
global $config;

if (empty($ip)) {
if (empty($ip) || !is_string($ip)) {
return false;
}

Expand Down Expand Up @@ -113,7 +113,7 @@ function match_ipv6($ip, $ip_only = true) {
function match_ipv4($ip, $ip_only = true) {
global $config;

if (empty($ip)) {
if (empty($ip) || !is_string($ip)) {
return false;
}

Expand Down

0 comments on commit caa254e

Please sign in to comment.