summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-07-12 12:09:05 +0200
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2022-07-26 09:42:33 +0000
commitd0ceedf05400dc36fad016e05b88456895bfb410 (patch)
tree76004a3dfabc2f60166198057128c0d0559afbad /tests
parent8cddb75c2b3b34b9062ddc9c02533e502d1dc62f (diff)
downloadnextcloud-server-d0ceedf05400dc36fad016e05b88456895bfb410.tar.gz
nextcloud-server-d0ceedf05400dc36fad016e05b88456895bfb410.zip
Use Symfony IpUtils to check for local IP ranges
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Http/Client/LocalAddressCheckerTest.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/lib/Http/Client/LocalAddressCheckerTest.php b/tests/lib/Http/Client/LocalAddressCheckerTest.php
index 0bba1cee5f4..9f2f6c72993 100644
--- a/tests/lib/Http/Client/LocalAddressCheckerTest.php
+++ b/tests/lib/Http/Client/LocalAddressCheckerTest.php
@@ -96,6 +96,8 @@ class LocalAddressCheckerTest extends \Test\TestCase {
['10.0.0.1'],
['::'],
['::1'],
+ ['100.100.100.200'],
+ ['192.0.0.1'],
];
}
@@ -116,6 +118,9 @@ class LocalAddressCheckerTest extends \Test\TestCase {
['another-host.local'],
['service.localhost'],
['!@#$'], // test invalid url
+ ['100.100.100.200'],
+ ['192.0.0.1'],
+ ['randomdomain.internal'],
];
}