mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-28 01:10:51 +01:00
Fix for IPv6-IPv4 setups with IPv4 addresses as "::x.x.x.x" and not :ffff
This commit is contained in:
parent
c27027d3e0
commit
cfbda5433a
@ -61,7 +61,7 @@
|
||||
$__ip = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
// ::ffff:0.0.0.0
|
||||
if(preg_match('/^\:\:ffff\:(\d+\.\d+\.\d+\.\d+)$/', $__ip, $m))
|
||||
if(preg_match('/^\:\:(ffff\:)?(\d+\.\d+\.\d+\.\d+)$/', $__ip, $m))
|
||||
$_SERVER['REMOTE_ADDR'] = $m[1];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user