phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpgwapi/inc class.setup.inc.php,1.6,1.7


From: Miles Lott <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.setup.inc.php,1.6,1.7
Date: Tue, 05 Mar 2002 21:40:32 -0500

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv14407/phpgwapi/inc

Modified Files:
        class.setup.inc.php 
Log Message:
Add expiration of 20 minutes (to be changed to idle time check later); Change
login behavior to be able to verify acceptance of the cookies before showing
the page (using refresh - tested on NS, Mozilla, IE, Konqueror)



Index: class.setup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.setup.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.setup.inc.php 4 Mar 2002 04:49:42 -0000       1.6
--- class.setup.inc.php 6 Mar 2002 02:40:30 -0000       1.7
***************
*** 68,72 ****
                @param  $auth_type      ???
                */
!               function auth($auth_type='Config')
                {
                        $FormLogout   = get_var('FormLogout',  
array('GET','POST'));
--- 68,72 ----
                @param  $auth_type      ???
                */
!               function auth($auth_type='Config',$ConfigPW='',$HeaderPW='')
                {
                        $FormLogout   = get_var('FormLogout',  
array('GET','POST'));
***************
*** 77,82 ****
  
                        $ConfigDomain = 
get_var('ConfigDomain',array('POST','COOKIE'));
!                       $ConfigPW     = get_var('ConfigPW',    
array('POST','COOKIE'));
!                       $HeaderPW     = get_var('HeaderPW',    
array('POST','COOKIE'));
                        $ConfigLang   = get_var('ConfigLang',  
array('POST','COOKIE'));
  
--- 77,82 ----
  
                        $ConfigDomain = 
get_var('ConfigDomain',array('POST','COOKIE'));
!                       $ConfigPW     = $ConfigPW ? $ConfigPW : 
get_var('ConfigPW',    array('POST','COOKIE'));
!                       $HeaderPW     = $HeaderPW ? $HeaderPW : 
get_var('HeaderPW',    array('POST','COOKIE'));
                        $ConfigLang   = get_var('ConfigLang',  
array('POST','COOKIE'));
  
***************
*** 90,93 ****
--- 90,95 ----
                        */
  
+                       $expire = time() + 1200; /* Expire login in 20 minutes. 
*/
+ 
                        if(!empty($HeaderLogin) && $auth_type == 'Header')
                        {
***************
*** 95,100 ****
                                if($FormPW == 
$GLOBALS['phpgw_info']['server']['header_admin_password'])
                                {
!                                       setcookie('HeaderPW',"$FormPW");
!                                       return True;
                                }
                                else
--- 97,103 ----
                                if($FormPW == 
$GLOBALS['phpgw_info']['server']['header_admin_password'])
                                {
!                                       
setcookie('HeaderPW',"$FormPW","$expire");
!                                       header('Location: manageheader.php');
!                                       echo '<meta http-equiv="Refresh" 
content="1">' . lang('Please Wait...');
                                }
                                else
***************
*** 110,117 ****
                                if($FormPW == 
$GLOBALS['phpgw_domain'][$FormDomain]['config_passwd'])
                                {
!                                       setcookie('ConfigPW',"$FormPW");
!                                       setcookie('ConfigDomain',"$FormDomain");
!                                       setcookie('ConfigLang',"$ConfigLang");
!                                       return True;
                                }
                                else
--- 113,120 ----
                                if($FormPW == 
$GLOBALS['phpgw_domain'][$FormDomain]['config_passwd'])
                                {
!                                       
setcookie('ConfigPW',"$FormPW","$expire");
!                                       
setcookie('ConfigDomain',"$FormDomain","$expire");
!                                       
setcookie('ConfigLang',"$ConfigLang","$expire");
!                                       echo '<meta http-equiv="Refresh" 
content="1">' . lang('Please Wait...');
                                }
                                else




reply via email to

[Prev in Thread] Current Thread [Next in Thread]