dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9bdfb0
)
*stab stab stab*
author
Brion Vibber
<brion@users.mediawiki.org>
Thu, 19 Apr 2007 13:59:00 +0000
(13:59 +0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Thu, 19 Apr 2007 13:59:00 +0000
(13:59 +0000)
includes/ProxyTools.php
patch
|
blob
|
history
diff --git
a/includes/ProxyTools.php
b/includes/ProxyTools.php
index
e72a338
..
840c580
100644
(file)
--- a/
includes/ProxyTools.php
+++ b/
includes/ProxyTools.php
@@
-34,7
+34,7
@@
function wfGetLastIPfromXFF( $xff ) {
$xff = substr( $xff, 0, 255 );
// Look for the last IP, assuming they are separated by commas or spaces
$n = ( strrpos($xff, ',') ) ? strrpos($xff, ',') : strrpos($xff, ' ');
- if (
strrpos
!== false ) {
+ if (
$n
!== false ) {
$last = trim( substr( $xff, $n + 1 ) );
// Make sure it is an IP
$m = preg_match('#^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$#', $last);