]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix DNS Pin Middleware throwing for public IPs 35028/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Tue, 8 Nov 2022 13:18:05 +0000 (14:18 +0100)
committerChristoph Wurst <christoph@winzerhof-wurst.at>
Tue, 8 Nov 2022 13:18:05 +0000 (14:18 +0100)
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
lib/private/Http/Client/DnsPinMiddleware.php

index 294a23f9de15169082818da7a1fded04259b534e..c6a58972fdd6563d94e993be9b13ac03c78724cf 100644 (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');
                                                }