Skip to content

Commit 4e43439

Browse files
committed
Replace left-over from Net-utils with Symfony's IpUtils
1 parent 07e67b9 commit 4e43439

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/SimpleSAML/Metadata/MetaDataStorageSource.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use Exception;
88
use SimpleSAML\{Configuration, Error, Module, Utils};
9+
use Symfony\Component\HttpFoundation\IpUtils;
910
use Symfony\Component\Filesystem\Filesystem;
1011

1112
use function array_flip;
@@ -217,9 +218,8 @@ public function getPreferredEntityIdFromCIDRhint(string $set, string $ip, string
217218
continue;
218219
}
219220

220-
$netUtils = new Utils\Net();
221221
foreach ($cidrHints as $hint_entry) {
222-
if ($netUtils->ipCIDRcheck($hint_entry, $ip)) {
222+
if (IpUtils::checkIp($ip, $hint_entry)) {
223223
if ($type === 'entityid') {
224224
return $entry['entityid'];
225225
} else {

0 commit comments

Comments
 (0)