Changeset 1061 for trunk/header.session.inc.php
- Timestamp:
- 06/30/09 16:29:01 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/header.session.inc.php
r1040 r1061 1 1 <?php 2 $connection_id = $GLOBALS['phpgw']->session->sessionid; 3 if (strlen($connection_id) != 32){ 4 $GLOBALS['phpgw']->redirect($GLOBALS['phpgw_info']['server']['webserver_url'].'/login.php?cd=2'); 5 exit; 6 } 7 $connection_id .= $GLOBALS['phpgw']->session->getuser_ip(); 8 $connection_id .= $_SERVER[ 'HTTP_USER_AGENT' ]; 2 session_id( $_COOKIE[ 'sessionid' ] ); 3 session_start( ); 9 4 10 if (!isset($_SESSION['connection_db_info'])) 11 { 12 $GLOBALS['phpgw']->db->query("select sessionid, ip, browser from phpgw_access_log where account_id <> 0 and lo = 0 and sessionid='{$GLOBALS['phpgw']->session->sessionid}' limit 1",__LINE__,__FILE__); 13 $GLOBALS['phpgw']->db->next_record( ); 14 $_SESSION['connection_db_info']['user_auth'] = $GLOBALS['phpgw']->db->row( ); 15 } 5 $sess = $_SESSION[ 'phpgw_session' ]; 6 $connection_id = "{$sess['session_id']}{$sess['session_ip']}{$_SERVER[ 'HTTP_USER_AGENT' ]}"; 16 7 17 8 if ($_SESSION['connection_db_info']['user_auth'] && implode('',$_SESSION['connection_db_info']['user_auth']) !== $connection_id) … … 20 11 exit; 21 12 } 22 23 13 ?>
Note: See TracChangeset
for help on using the changeset viewer.