From 3e90ce89eb102524bf27458cb31efbea9f26416a Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 16 Jun 2025 20:32:15 +0200 Subject: [PATCH] test(net): include test for localhost by IP Signed-off-by: Christoph Wurst --- tests/lib/Net/IpAddressClassifierTest.php | 2 ++ tests/lib/Security/RemoteHostValidatorIntegrationTest.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/lib/Net/IpAddressClassifierTest.php b/tests/lib/Net/IpAddressClassifierTest.php index f20e1ec1785..6014eb9dffe 100644 --- a/tests/lib/Net/IpAddressClassifierTest.php +++ b/tests/lib/Net/IpAddressClassifierTest.php @@ -39,6 +39,8 @@ class IpAddressClassifierTest extends TestCase { public static function localIpAddressData(): array { return [ + ['127.0.0.1'], + ['127.0.0.13'], // all 127.0.0.0/8 network is loopback address ['192.168.0.1'], ['fe80::200:5aee:feaa:20a2'], ['fe80::1fc4:15d8:78db:2319%enp4s0'], // v6 zone ID diff --git a/tests/lib/Security/RemoteHostValidatorIntegrationTest.php b/tests/lib/Security/RemoteHostValidatorIntegrationTest.php index 913acfa054d..f5af0897f2c 100644 --- a/tests/lib/Security/RemoteHostValidatorIntegrationTest.php +++ b/tests/lib/Security/RemoteHostValidatorIntegrationTest.php @@ -42,6 +42,8 @@ class RemoteHostValidatorIntegrationTest extends TestCase { ['[::1]'], ['[::]'], ['192.168.0.1'], + ['127.0.0.1'], + ['127.0.0.13'], // all 127.0.0.0/8 network is loopback address ['172.16.42.1'], ['[fdf8:f53b:82e4::53]'], ['[fe80::200:5aee:feaa:20a2]'],