Ignore:
Timestamp:
11/10/10 12:57:43 (13 years ago)
Author:
rafaelraymundo
Message:

Ticket #831 - Encadeamento de proxies reversos e login

Location:
branches/2.2/phpgwapi/inc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/phpgwapi/inc/class.sessions.inc.php

    r3430 r3486  
    405405                { 
    406406                        // Use HTTP_X_FORWARDED_HOST if set, which is the case behind a none-transparent proxy 
    407                         $this->cookie_domain = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ?  $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST']; 
     407                        //$this->cookie_domain = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ?  $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST']; 
     408                        //Modificacao feita para que o Expresso redirecione para o primeiro proxy caso haja um encadeamento de mais de um proxy. 
     409                        $this->cookie_domain = nearest_to_me(); 
    408410 
    409411                        // remove port from HTTP_HOST 
  • branches/2.2/phpgwapi/inc/common_functions.inc.php

    r3437 r3486  
    706706        } 
    707707 
     708        /*! 
     709         @function nearest_to_me 
     710         @abstract return host nearest to client 
     711         @Include by Serpro ( Antonio Carlos da Silva). 
     712         */ 
     713        function nearest_to_me() 
     714        { 
     715                $proxies=explode(',',$_SERVER['HTTP_X_FORWARDED_HOST']); 
     716                return isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $proxies[0] : $_SERVER['HTTP_HOST']; 
     717        } 
     718 
    708719        /*! 
    709720         @function session_convert 
Note: See TracChangeset for help on using the changeset viewer.