Krzysztof Krzyzaniak has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/49990


Change subject: function should use wfIsTrustedProxy since it could be extented 
by hook IsTrustedProxy.
......................................................................

function should use wfIsTrustedProxy since it could be extented by hook 
IsTrustedProxy.

Change-Id: Ibf0987d7e86047583bb928d7a29969a668b7e778
---
M CheckUser.hooks.php
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser 
refs/changes/90/49990/1

diff --git a/CheckUser.hooks.php b/CheckUser.hooks.php
index 35beef9..50f3121 100644
--- a/CheckUser.hooks.php
+++ b/CheckUser.hooks.php
@@ -236,7 +236,6 @@
         * @return array( string, bool )
         */
        public static function getClientIPfromXFF( $xff ) {
-               global $wgSquidServers, $wgSquidServersNoPurge;
 
                if ( !$xff ) {
                        return array( null, false );
@@ -260,8 +259,7 @@
                                        if ( IP::isPublic( $ip ) ) {
                                                $client = $ip;
                                        }
-                               } elseif ( !in_array( $ip, $wgSquidServers )
-                                       && !in_array( $ip, 
$wgSquidServersNoPurge ) )
+                               } elseif ( !wfIsTrustedProxy( $ip ) )
                                {
                                        $isSquidOnly = false;
                                        break;

-- 
To view, visit https://gerrit.wikimedia.org/r/49990
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf0987d7e86047583bb928d7a29969a668b7e778
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CheckUser
Gerrit-Branch: master
Gerrit-Owner: Krzysztof Krzyzaniak <e...@wikia-inc.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to