Rev | Line | |
---|
[1040] | 1 | <?php |
---|
[2335] | 2 | if ( isset( $_COOKIE[ 'sessionid' ] ) ) |
---|
| 3 | session_id( $_COOKIE[ 'sessionid' ] ); |
---|
| 4 | |
---|
[1061] | 5 | session_start( ); |
---|
| 6 | $sess = $_SESSION[ 'phpgw_session' ]; |
---|
[2329] | 7 | $connection_id = "{$sess['session_id']}{$sess['session_ip']}".substr($_SERVER[ 'HTTP_USER_AGENT' ],0,199); |
---|
| 8 | |
---|
| 9 | if ( empty($_SESSION['phpgw_session']['session_id']) || |
---|
| 10 | ($_SESSION['connection_db_info']['user_auth'] && implode('',$_SESSION['connection_db_info']['user_auth']) !== $connection_id) |
---|
| 11 | ) |
---|
| 12 | { |
---|
| 13 | if($_SESSION['connection_db_info']['user_auth'] && !strstr($_SERVER['SCRIPT_URL'],"/controller.php")) |
---|
| 14 | error_log( '[ INVALID SESSION ] >>>>' . implode('',$_SESSION['connection_db_info']['user_auth']) . '<<<< - >>>>' . $connection_id . '<<<<', 0 ); |
---|
[1040] | 15 | |
---|
[1161] | 16 | setcookie("PHPSESSID","",0); |
---|
[2065] | 17 | setcookie ("sessionid","",0); |
---|
[2329] | 18 | unset($_SESSION); |
---|
[2332] | 19 | // From ExpressoAjax response "nosession" |
---|
[2329] | 20 | if(strstr($_SERVER['SCRIPT_URL'],"/controller.php")){ |
---|
| 21 | echo serialize(array("nosession" => true)); |
---|
| 22 | exit; |
---|
| 23 | } |
---|
[1040] | 24 | } |
---|
[2329] | 25 | else{ |
---|
[2332] | 26 | // From ExpressoAjax update session_dla (datetime last access). |
---|
| 27 | if(strstr($_SERVER['SCRIPT_URL'],"/controller.php")) |
---|
| 28 | $_SESSION['phpgw_session']['session_dla'] = time(); |
---|
[2329] | 29 | } |
---|
| 30 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.