Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, October 15, 2026

Diff for Metafox/lib/Auth/AuthDB.php between version 1.8 and 1.9

version 1.8, 2007/09/22 06:39:57 version 1.9, 2009/10/14 11:56:09
Line 17 
Line 17 
  * http://platon.sk/projects/phpPlatonLib/   * http://platon.sk/projects/phpPlatonLib/
  */   */
   
 /* $Platon: phpPlatonLib/Auth_AuthDB/AuthDB.php,v 1.16 2007-09-22 06:13:06 nepto Exp $ */  /* $Platon: phpPlatonLib/Auth_AuthDB/AuthDB.php,v 1.18 2009-10-14 11:45:40 nepto Exp $ */
   
 /*  /*
  * History:   * History:
Line 33 
Line 33 
  *              authentification interface   *              authentification interface
  * 2007-09-22 - configurable cookie name, path, domain   * 2007-09-22 - configurable cookie name, path, domain
  *            - configurable username/password CGI form variable name   *            - configurable username/password CGI form variable name
    * 2009-10-14 - disable domain in cookie if domain is "localhost"
  */   */
   
 require_once 'DB.php';  require_once 'DB.php';
Line 81  class AuthDB
Line 82  class AuthDB
                 if (! isset($this->_options['cookie']['name'])) {                  if (! isset($this->_options['cookie']['name'])) {
                         $this->_options['cookie']['name'] = AUTH_DB_COOKIE_NAME;                          $this->_options['cookie']['name'] = AUTH_DB_COOKIE_NAME;
                 }                  }
                   if (! strcasecmp(trim($this->_options['cookie']['domain']), 'localhost')) {
                           $this->_options['cookie']['domain'] = null;
                   }
         } /* }}} */          } /* }}} */
   
         /**          /**
Line 259  class AuthDB
Line 263  class AuthDB
                                 /* Sending HTTP_X_FORWARDED_FOR? OK, send anything you want,                                  /* Sending HTTP_X_FORWARDED_FOR? OK, send anything you want,
                                    but it must persist for the whole session. */                                     but it must persist for the whole session. */
                                 $ret = array();                                  $ret = array();
                                 foreach (array('REMOTE_ADDR', 'HTTP_X_FORWARDED_FOR') as $key) {                                  foreach (array('REMOTE_ADDR', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_REAL_IP') as $key) {
                                         if (isset($_SERVER[$key])) {                                          if (isset($_SERVER[$key])) {
                                                 $ret[] = $_SERVER[$key];                                                  $ret[] = $_SERVER[$key];
                                         }                                          }
                                 }                                  }
                                   $ret = array_unique($ret);
                                 $ret = join(' / ', $ret);                                  $ret = join(' / ', $ret);
                                 break;                                  break;
   

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top