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

RevLine 
[1040]1<?php
[1061]2        session_id( $_COOKIE[ 'sessionid' ] );
3        session_start( );
[1040]4
[1061]5        $sess = $_SESSION[ 'phpgw_session' ];
[1464]6        $connection_id = "{$sess['session_id']}{$sess['session_ip']}".substr($_SERVER[ 'HTTP_USER_AGENT' ],0,199);
[1040]7
[1464]8
[1040]9        if ($_SESSION['connection_db_info']['user_auth'] && implode('',$_SESSION['connection_db_info']['user_auth']) !== $connection_id)
10        {
[1161]11                setcookie("PHPSESSID","",0);
12                setcookie ("sessionid","",0);
[1040]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.