Krinkle has uploaded a new change for review.

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

Change subject: rl-test: Track full XFF, not just the trusted "client" IP
......................................................................

rl-test: Track full XFF, not just the trusted "client" IP

Per Catrope, this'll help potentially find common proxies.

Change-Id: I040222e28ccbe664219d43354307f02c587e208b
---
M w/rl-test.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/04/228204/1

diff --git a/w/rl-test.php b/w/rl-test.php
index eeaf5d7..6f38e9e 100644
--- a/w/rl-test.php
+++ b/w/rl-test.php
@@ -18,10 +18,10 @@
        exit;
 }
 
-$ua = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : '-';
-$ip = $wgRequest->getIP();
+$ua = @$_SERVER['HTTP_USER_AGENT'] ?: '-';
+$xff = @$_SERVER['HTTP_X_FORWARDED_FOR'] ?: '-';
 
-$line = "[$date] version: $version; ip: $ip; ua: $ua";
+$line = "[$date] version: $version; xff: $xff; ua: $ua";
 
 // Clean up
 $line = strtr( $line, array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I040222e28ccbe664219d43354307f02c587e208b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle <krinklem...@gmail.com>

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

Reply via email to