source: trunk/header.session.inc.php @ 2065

Revision 2065, 629 bytes checked in by amuller, 14 years ago (diff)

Ticket #922 - Colocar na log os erros de validação de sessão

Line 
1<?php
2        if ( isset( $_COOKIE[ 'sessionid' ] ) )
3                session_id( $_COOKIE[ 'sessionid' ] );
4
5        session_start( );
6
7        $sess = $_SESSION[ 'phpgw_session' ];
8        $connection_id = "{$sess['session_id']}{$sess['session_ip']}".substr($_SERVER[ 'HTTP_USER_AGENT' ],0,199);
9
10
11        if ($_SESSION['connection_db_info']['user_auth'] && implode('',$_SESSION['connection_db_info']['user_auth']) !== $connection_id)
12        {
13                error_log( '[ NOT VALIDATED SESSION ] >>>>' . implode('',$_SESSION['connection_db_info']['user_auth']) . '<<<< - >>>>' . $connection_id . '<<<<', 0 );
14                setcookie("PHPSESSID","",0);
15                setcookie ("sessionid","",0);   
16                exit;
17        }
18?>
Note: See TracBrowser for help on using the repository browser.