From 25c0021137a2e80dc83a13e814ed4869ecb62782 Mon Sep 17 00:00:00 2001 From: Robin Kluth Date: Mon, 19 Feb 2024 11:19:58 +0100 Subject: Log Host/IP in `LocalServerException` for `Host violates local access rules` Signed-off-by: Robin Kluth --- lib/private/Http/Client/DnsPinMiddleware.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/Http/Client/DnsPinMiddleware.php') diff --git a/lib/private/Http/Client/DnsPinMiddleware.php b/lib/private/Http/Client/DnsPinMiddleware.php index aecccc6ce97..80454010a29 100644 --- a/lib/private/Http/Client/DnsPinMiddleware.php +++ b/lib/private/Http/Client/DnsPinMiddleware.php @@ -147,7 +147,7 @@ class DnsPinMiddleware { foreach ($targetIps as $ip) { if ($this->ipAddressClassifier->isLocalAddress($ip)) { // TODO: continue with all non-local IPs? - throw new LocalServerException('Host violates local access rules'); + throw new LocalServerException('Host "'.$ip.'" violates local access rules'); } $curlResolves["$hostName:$port"][] = $ip; } -- cgit v1.2.3 From 414f8f1f2d9f04dfee2b94e5570b490f58f6e030 Mon Sep 17 00:00:00 2001 From: Robin Kluth Date: Mon, 19 Feb 2024 14:26:42 +0100 Subject: Include `hostName:$port` for Host access violation message as well Signed-off-by: Robin Kluth --- lib/private/Http/Client/DnsPinMiddleware.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/Http/Client/DnsPinMiddleware.php') diff --git a/lib/private/Http/Client/DnsPinMiddleware.php b/lib/private/Http/Client/DnsPinMiddleware.php index 80454010a29..518281e4af0 100644 --- a/lib/private/Http/Client/DnsPinMiddleware.php +++ b/lib/private/Http/Client/DnsPinMiddleware.php @@ -147,7 +147,7 @@ class DnsPinMiddleware { foreach ($targetIps as $ip) { if ($this->ipAddressClassifier->isLocalAddress($ip)) { // TODO: continue with all non-local IPs? - throw new LocalServerException('Host "'.$ip.'" violates local access rules'); + throw new LocalServerException('Host "'.$ip.'" ('.$hostName.':'.$port.') violates local access rules'); } $curlResolves["$hostName:$port"][] = $ip; } -- cgit v1.2.3