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

Revision 1464, 538 bytes checked in by amuller, 15 years ago (diff)

Ticket #664 - Correção de problema quando user agent ultrapassa 200 caracteres

Line 
1<?php
2        session_id( $_COOKIE[ 'sessionid' ] );
3        session_start( );
4
5        $sess = $_SESSION[ 'phpgw_session' ];
6        $connection_id = "{$sess['session_id']}{$sess['session_ip']}".substr($_SERVER[ 'HTTP_USER_AGENT' ],0,199);
7
8
9        if ($_SESSION['connection_db_info']['user_auth'] && implode('',$_SESSION['connection_db_info']['user_auth']) !== $connection_id)
10        {
11                setcookie("PHPSESSID","",0);
12                setcookie ("sessionid","",0);
13                echo lang("An important error has occured with your login, please contact your system administrator"); 
14                exit;
15        }
16?>
Note: See TracBrowser for help on using the repository browser.