Ignore:
Timestamp:
May 24, 2014, 11:35:47 PM (10 years ago)
Author:
chronos
Message:
  • Fixed: Do not log client proxy IP address as remote address because it can be faked and also there can be multiple client proxy addresses.
  • Modified: Do not use directly $_SERVER variables REMOTE_ADDR and REQUEST_URI as they are not initialized if script is executed from command line.
  • Fixed: Default configuration was not complete.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Referrer/Referrer.php

    r804 r805  
    4040      if(!in_array($HostName, $this->Excludes))
    4141      {
    42         if(!isset($_SERVER['REMOTE_ADDR'])) $IP = 'Konzole';
    43           else $IP = addslashes($_SERVER['REMOTE_ADDR']);
    44 
     42        $IP = GetRemoteAddress();
     43       
    4544        // Check if client IP is not blocked as spam source
    4645        $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `Referrer` WHERE `LastIP` = "'.$IP.'" AND (`Visible` = 0)');
Note: See TracChangeset for help on using the changeset viewer.