Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/92050
Change subject: Allow extensions to override the IP address
......................................................................
Allow extensions to override the IP address
Some extensions use system accounts which may generate
recentchanges entries during a web request. CheckUser
will think these came from the same IP, however they
shouldn't be associated together. Extensions can use a
hook to fix this.
Bug: 42345
Change-Id: I875401dbc2da5f6821b15906bb37a4a20104cad6
---
M CheckUser.hooks.php
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser
refs/changes/50/92050/1
diff --git a/CheckUser.hooks.php b/CheckUser.hooks.php
index f3f79d1..9c565cc 100644
--- a/CheckUser.hooks.php
+++ b/CheckUser.hooks.php
@@ -11,6 +11,10 @@
extract( $rc->mAttribs );
// Get IP
$ip = $wgRequest->getIP();
+
+ // Allow extensions to set a different IP for system accounts
+ wfRunHooks( 'CheckUserGetIP', array( &$rc_user, &$rc_user_text,
&$ip ) );
+
// Get XFF header
$xff = $wgRequest->getHeader( 'X-Forwarded-For' );
list( $xff_ip, $isSquidOnly ) = self::getClientIPfromXFF( $xff
);
--
To view, visit https://gerrit.wikimedia.org/r/92050
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I875401dbc2da5f6821b15906bb37a4a20104cad6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CheckUser
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits