Changeset 196 for tags


Ignore:
Timestamp:
Jul 2, 2006 12:01:19 AM (18 years ago)
Author:
scdev
Message:

Q - ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/2.0.2/lib/Auth_File.inc.php

    r194 r196  
    232232    {
    233233        // Some users will access from networks with a changing IP number (i.e. behind a proxy server). These users must be allowed entry by adding their IP to the list of trusted_networks.
    234         if ($trusted_net = ipInRange(getRemoteAddr(), $this->_params['trusted_networks'])) {
     234        if (isset($_SESSION[$this->_sess]['username']) && $trusted_net = ipInRange(getRemoteAddr(), $this->_params['trusted_networks'])) {
    235235            $user_in_trusted_network = true;
    236236            App::logMsg(sprintf('User %s accessing from trusted network %s', $_SESSION[$this->_sess]['username'], $trusted_net), LOG_DEBUG, __FILE__, __LINE__);
    237         } else if (preg_match('/proxy.aol.com$/i', getRemoteAddr(true))) {
     237        } else if (isset($_SESSION[$this->_sess]['username']) && preg_match('/proxy.aol.com$/i', getRemoteAddr(true))) {
    238238            $user_in_trusted_network = true;
    239239            App::logMsg(sprintf('User %s accessing from trusted network proxy.aol.com', $_SESSION[$this->_sess]['username']), LOG_DEBUG, __FILE__, __LINE__);
Note: See TracChangeset for help on using the changeset viewer.