Changeset 563 for trunk/lib


Ignore:
Timestamp:
Feb 28, 2016 9:18:02 PM (8 years ago)
Author:
anonymous
Message:

Removed assumption of localhost for mysql server. Removed exception for proxy.aol.com.

Location:
trunk/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/App.inc.php

    r562 r563  
    122122
    123123        // DB credentials should be set as apache environment variables in httpd.conf, readable only by root.
    124         'db_server' => 'localhost',
     124        'db_server' => null,
    125125        'db_name' => null,
    126126        'db_user' => null,
  • trunk/lib/Auth_File.inc.php

    r502 r563  
    260260            $user_in_trusted_network = true;
    261261            $app->logMsg(sprintf('User %s accessing from trusted network %s', $_SESSION['_auth_file'][$this->_ns]['username'], $trusted_net), LOG_DEBUG, __FILE__, __LINE__);
    262         } else if (preg_match('/proxy.aol.com$/i', getRemoteAddr(true))) {
    263             $user_in_trusted_network = true;
    264             $app->logMsg(sprintf('User %s accessing from trusted network proxy.aol.com', $_SESSION['_auth_file'][$this->_ns]['username']), LOG_DEBUG, __FILE__, __LINE__);
    265262        } else {
    266263            $user_in_trusted_network = false;
  • trunk/lib/Auth_SQL.inc.php

    r560 r563  
    525525
    526526            // Update the login counter table with this login access. Convert IP to binary.
    527             // TODO: after MySQL 5.0.23 is released this query could benefit from INSERT DELAYED.
     527            // TODO: this query could benefit from INSERT DELAYED.
    528528            $db->query("
    529529                INSERT INTO " . $this->_params['db_login_table'] . " (
     
    558558     *  - total logged-in time is not greater than login_timeout
    559559     *  - idle time is not greater than idle_timeout
    560      *  - remote address is the same as the login remote address (aol users excluded).
     560     *  - remote address is the same as the login remote address
    561561     *
    562562     * @access public
     
    588588        }
    589589
    590         // Tesing login should occur once. This is the first time. Set flag.
     590        // Testing login should occur once. This is the first time. Set flag.
    591591        $this->_authentication_tested = true;
    592592
     
    598598                ($this->get('user_id') ? $this->get('user_id') . ' (' .  $this->get('username') . ')' : 'unknown'),
    599599                $trusted_net
    600             ), LOG_DEBUG, __FILE__, __LINE__);
    601         } else if (preg_match('/proxy.aol.com$/i', getRemoteAddr(true))) {
    602             $user_in_trusted_network = true;
    603             $app->logMsg(sprintf('User_id %s accessing from trusted network proxy.aol.com',
    604                 ($this->get('user_id') ? $this->get('user_id') . ' (' .  $this->get('username') . ')' : 'unknown')
    605600            ), LOG_DEBUG, __FILE__, __LINE__);
    606601        } else {
     
    670665                    //   1. match_remote_ip config is enabled
    671666                    //   2. user is not match_remote_ip_exempt (set in the user_data, or in the match_remote_ip_exempt_usernames list)
    672                     //   3. the user is connecting from a trusted network (their IP is listed in the trusted_networks or from *.proxy.aol.com)
     667                    //   3. the user is connecting from a trusted network (their IP is listed in the trusted_networks)
    673668                    $expire_reasons[] = sprintf('remote_ip not matched (%s != %s)', $_SESSION['_auth_sql'][$this->_ns]['remote_ip'], getRemoteAddr());
    674669                } else {
  • trunk/lib/DB.inc.php

    r550 r563  
    147147        }
    148148
     149        if (!$this->getParam('db_server')) {
     150            // If db_server not specified, assume localhost.
     151            $this->setParam('db_server', 'localhost');
     152        }
     153
    149154        // Connect to database. Always create a new link to the server.
    150         // Connection errors are surpressed so we can do our own error management below.
     155        // Connection errors are suppressed so we can do our own error management below.
    151156        if ($this->dbh = @mysql_connect($this->getParam('db_server'), $this->getParam('db_user'), $this->getParam('db_pass'), true)) {
    152157            // Select database
Note: See TracChangeset for help on using the changeset viewer.