mirror of
https://github.com/e107inc/e107.git
synced 2025-07-12 18:46:20 +02:00
Issue #2204 - Prevent ban check on server IP.
This commit is contained in:
@ -100,6 +100,8 @@ class eIPHandler
|
|||||||
*/
|
*/
|
||||||
private $ourIP = '';
|
private $ourIP = '';
|
||||||
|
|
||||||
|
private $serverIP = '';
|
||||||
|
|
||||||
private $debug = false;
|
private $debug = false;
|
||||||
/**
|
/**
|
||||||
* Host name of current user
|
* Host name of current user
|
||||||
@ -168,6 +170,9 @@ class eIPHandler
|
|||||||
|
|
||||||
|
|
||||||
$this->ourIP = $this->ipEncode($this->getCurrentIP());
|
$this->ourIP = $this->ipEncode($this->getCurrentIP());
|
||||||
|
|
||||||
|
$this->serverIP = $this->ipEncode($_SERVER['SERVER_ADDR']);
|
||||||
|
|
||||||
$this->makeUserToken();
|
$this->makeUserToken();
|
||||||
$ipStatus = $this->checkIP($this->ourIP);
|
$ipStatus = $this->checkIP($this->ourIP);
|
||||||
if ($ipStatus != 0)
|
if ($ipStatus != 0)
|
||||||
@ -886,7 +891,7 @@ class eIPHandler
|
|||||||
{
|
{
|
||||||
$ip = $this->getip(); // This will be in normalised IPV6 form
|
$ip = $this->getip(); // This will be in normalised IPV6 form
|
||||||
|
|
||||||
if ($ip != e107::LOCALHOST_IP && $ip != e107::LOCALHOST_IP2) // Check host name, user email to see if banned
|
if ($ip !== e107::LOCALHOST_IP && ($ip !== e107::LOCALHOST_IP2) && ($ip !== $this->serverIP)) // Check host name, user email to see if banned
|
||||||
{
|
{
|
||||||
$vals = array();
|
$vals = array();
|
||||||
if (e107::getPref('enable_rdns'))
|
if (e107::getPref('enable_rdns'))
|
||||||
|
Reference in New Issue
Block a user