[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions.inc.php,1.104.4.5,1
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions.inc.php,1.104.4.5,1.104.4.6 |
Date: |
Sun, 18 May 2003 10:07:59 -0400 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv6964
Modified Files:
Tag: Version-0_9_16-branch
class.sessions.inc.php
Log Message:
got multidomain-login (with and without domain-selectbox) finaly working for
register_globals off
Index: class.sessions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.sessions.inc.php,v
retrieving revision 1.104.4.5
retrieving revision 1.104.4.6
diff -C2 -r1.104.4.5 -r1.104.4.6
*** class.sessions.inc.php 18 May 2003 11:32:47 -0000 1.104.4.5
--- class.sessions.inc.php 18 May 2003 14:07:57 -0000 1.104.4.6
***************
*** 178,185 ****
--- 178,187 ----
$session = $this->read_session($sessionid);
+ //echo "<p>session::verify(id='$sessionid'): \n";
print_r($session); echo "</p>\n";
if ($session['session_dla'] <= (time() -
$GLOBALS['phpgw_info']['server']['sessions_timeout']))
{
$this->clean_sessions();
+ echo "<p>session timed out</p>\n";
return False;
}
***************
*** 306,310 ****
unset($GLOBALS['phpgw']->crypto);
}
! //echo 'DEBUG: Sessions: account_id is
empty!<br>'."\n";
return False;
}
--- 308,312 ----
unset($GLOBALS['phpgw']->crypto);
}
! echo 'DEBUG: Sessions: account_id is
empty!<br>'."\n";
return False;
}
***************
*** 380,396 ****
$this->clean_sessions();
! $login_array = explode('@', $login);
! $this->account_lid = $login_array[0];
$now = time();
! if (count($login_array) > 1)
! {
! $this->account_domain = $login_array[1];
! }
! else
{
$this->account_domain =
$GLOBALS['phpgw_info']['server']['default_domain'];
}
$user_ip = $this->getuser_ip();
--- 382,394 ----
$this->clean_sessions();
! list($this->account_lid,$this->account_domain) =
explode('@', $login);
$now = time();
! if (strstr($login,'@') === False)
{
$this->account_domain =
$GLOBALS['phpgw_info']['server']['default_domain'];
}
+ //echo "<p>session::create(login='$login'):
lid='$this->account_lid', domain='$this->account_domain'</p>\n";
$user_ip = $this->getuser_ip();
***************
*** 425,439 ****
$this->phpgw_setcookie('kp3',$this->kp3);
$this->phpgw_setcookie('domain',$this->account_domain);
$this->phpgw_setcookie('last_domain',$this->account_domain,$now+1209600);
- if ($this->account_domain ==
$GLOBALS['phpgw_info']['server']['default_domain'])
- {
- $this->phpgw_setcookie('last_loginid',
$this->account_lid ,$now+1209600); /* For 2 weeks */
- }
- else
- {
- $this->phpgw_setcookie('last_loginid',
$login ,$now+1209600); /* For 2 weeks */
- }
-
unset($GLOBALS['phpgw_info']['server']['default_domain']); /* we kill this for
security reasons */
}
/* init the crypto object */
--- 423,433 ----
$this->phpgw_setcookie('kp3',$this->kp3);
$this->phpgw_setcookie('domain',$this->account_domain);
+ }
+ if ($GLOBALS['phpgw_info']['server']['usecookies'] ||
isset($_COOKIE['last_loginid']))
+ {
+ $this->phpgw_setcookie('last_loginid',
$this->account_lid ,$now+1209600); /* For 2 weeks */
$this->phpgw_setcookie('last_domain',$this->account_domain,$now+1209600);
}
+
unset($GLOBALS['phpgw_info']['server']['default_domain']); /* we kill this for
security reasons */
/* init the crypto object */
***************
*** 478,481 ****
--- 472,477 ----
$GLOBALS['phpgw']->auth->update_lastlogin($this->account_id,$user_ip);
$GLOBALS['phpgw']->db->transaction_commit();
+
+ if (!$this->sessionid) echo
"<p>session::create(login='$login') = '$this->sessionid':
lid='$this->account_lid', domain='$this->account_domain'</p>\n";
return $this->sessionid;
***************
*** 933,937 ****
}
!
if(@isset($GLOBALS['phpgw_info']['server']['enforce_ssl']) &&
$GLOBALS['phpgw_info']['server']['enforce_ssl'] && !$_SERVER['HTTPS'])
{
if(substr($url ,0,4) != 'http')
--- 929,933 ----
}
!
if(@isset($GLOBALS['phpgw_info']['server']['enforce_ssl']) &&
$GLOBALS['phpgw_info']['server']['enforce_ssl'] &&
!$GLOBALS['HTTP_SERVER_VARS']['HTTPS'])
{
if(substr($url ,0,4) != 'http')
***************
*** 954,960 ****
while ($i < count($a))
{
! $b = split('=', $a[$i]);
$new_extravars[$b[0]] = $b[1];
! $i++;
}
$extravars = $new_extravars;
--- 950,956 ----
while ($i < count($a))
{
! $b = split('=', $a[$i]);
$new_extravars[$b[0]] = $b[1];
! $i++;
}
$extravars = $new_extravars;
***************
*** 972,992 ****
/* add session params if not using cookies */
! if (address@hidden'phpgw_info']['server']['usecookies'])
{
! $kp3 = get_var('kp3',Array('GET','COOKIE'));
! if (!$kp3)
! {
! $kp3 =
$GLOBALS['phpgw_info']['user']['kp3'];
! }
!
! $sessionid = get_var('sessionid', array('GET',
'COOKIE'));
! if(!$sessionid)
! {
! $sessionid =
$GLOBALS['phpgw_info']['user']['sessionid'];
! }
!
! $extravars['sessionid'] = $sessionid;
! $extravars['kp3'] = $kp3;
! $extravars['domain'] =
@$GLOBALS['phpgw_info']['user']['domain'];
}
--- 968,976 ----
/* add session params if not using cookies */
! if (@!$GLOBALS['phpgw_info']['server']['usecookies'])
{
! $extravars['sessionid'] = $this->sessionid;
! $extravars['kp3'] = $this->kp3;
! $extravars['domain'] = $this->account_domain;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions.inc.php,1.104.4.5,1.104.4.6,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.121.2.13.2.8,1.121.2.13.2.9
- Next by Date:
[Phpgroupware-cvs] CVS: admin/inc class.uiaccess_history.inc.php,1.6.2.2.2.2,1.6.2.2.2.3 class.uicurrentsessions.inc.php,1.5.4.1,1.5.4.2 class.uilog.inc.php,1.8,1.8.4.1
- Previous by thread:
[Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.121.2.13.2.8,1.121.2.13.2.9
- Next by thread:
[Phpgroupware-cvs] CVS: admin/inc class.uiaccess_history.inc.php,1.6.2.2.2.2,1.6.2.2.2.3 class.uicurrentsessions.inc.php,1.5.4.1,1.5.4.2 class.uilog.inc.php,1.8,1.8.4.1
- Index(es):