Merge pull request #35028 from nextcloud/fix/dns-pin-middleware-throws-public-ip

Fix DNS Pin Middleware throwing for public IPs
This commit is contained in:
Richard Steinmetz 2022-11-08 16:44:50 +01:00 committed by GitHub
commit ad77bf4030
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -134,7 +134,7 @@ class DnsPinMiddleware {
$curlResolves["$hostName:$port"] = [];
foreach ($targetIps as $ip) {
if (!$this->ipAddressClassifier->isLocalAddress($ip)) {
if ($this->ipAddressClassifier->isLocalAddress($ip)) {
// TODO: continue with all non-local IPs?
throw new LocalServerException('Host violates local access rules');
}