X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FBlock.php;h=098d51c808dac4e17427bf8ddd761c7ed19bf97d;hb=0f72d17e3a0e4f6b607417c7fbff028ad0e4748d;hp=19ba0a28fbefd2b36db7f01a54156650b995786f;hpb=17914cc990c375340b688900b7782f1d7d5339fc;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Block.php b/includes/Block.php index 19ba0a28fb..098d51c808 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -19,6 +19,9 @@ * * @file */ + +use MediaWiki\MediaWikiServices; + class Block { /** @var string */ public $mReason; @@ -1120,6 +1123,7 @@ class Block { } $conds = []; + $proxyLookup = MediaWikiServices::getInstance()->getProxyLookup(); foreach ( array_unique( $ipChain ) as $ipaddr ) { # Discard invalid IP addresses. Since XFF can be spoofed and we do not # necessarily trust the header given to us, make sure that we are only @@ -1130,7 +1134,7 @@ class Block { continue; } # Don't check trusted IPs (includes local squids which will be in every request) - if ( IP::isTrustedProxy( $ipaddr ) ) { + if ( $proxyLookup->isTrustedProxy( $ipaddr ) ) { continue; } # Check both the original IP (to check against single blocks), as well as build