|
|
|
|
@ -251,6 +251,17 @@ class RefreshWebcalJob extends Job { |
|
|
|
|
$this->logger->warning("Subscription $subscriptionId was not refreshed because it violates local access rules"); |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Also check for IPv6 IPv4 nesting, because that's not covered by filter_var |
|
|
|
|
if ((bool)filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) && substr_count($host, '.') > 0) { |
|
|
|
|
$delimiter = strrpos($host, ':'); // Get last colon |
|
|
|
|
$ipv4Address = substr($host, $delimiter + 1); |
|
|
|
|
|
|
|
|
|
if (!filter_var($ipv4Address, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) { |
|
|
|
|
$this->logger->warning("Subscription $subscriptionId was not refreshed because it violates local access rules"); |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|