[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.172,1.173
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.172,1.173 |
Date: |
Sun, 18 May 2003 15:17:52 -0400 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv29493
Modified Files:
functions.inc.php
Log Message:
merged sesson-functions for .16, incl. the brute-force stuffe and cacheing the
data from other session in the appsession
fixed multidomain logins for register_globals off
Index: functions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/functions.inc.php,v
retrieving revision 1.172
retrieving revision 1.173
diff -C2 -r1.172 -r1.173
*** functions.inc.php 5 May 2003 19:11:47 -0000 1.172
--- functions.inc.php 18 May 2003 19:17:49 -0000 1.173
***************
*** 22,35 ****
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
\**************************************************************************/
/* $Id$ */
!
!
/***************************************************************************\
! * If running in PHP3, then load up the support functions file for
*
! * transparent support.
*
!
\***************************************************************************/
if (floor(phpversion()) == 3)
{
! include(PHPGW_API_INC.'/php3_support_functions.inc.php');
}
--- 22,37 ----
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
\**************************************************************************/
+
/* $Id$ */
!
!
/****************************************************************************\
! * If running in PHP3, then force admin to upgrade
*
!
\****************************************************************************/
if (floor(phpversion()) == 3)
{
! echo 'phpGroupWare now requires PHP 4.1 or greater.<br>';
! echo 'Please contact your System Administrator';
! exit;
}
***************
*** 90,94 ****
* Multi-Domain support
*
\****************************************************************************/
!
/* make them fix their header */
if (!isset($GLOBALS['phpgw_domain']))
--- 92,96 ----
* Multi-Domain support
*
\****************************************************************************/
!
/* make them fix their header */
if (!isset($GLOBALS['phpgw_domain']))
***************
*** 98,134 ****
}
reset($GLOBALS['phpgw_domain']);
! $default_domain = each($GLOBALS['phpgw_domain']);
! $GLOBALS['phpgw_info']['server']['default_domain'] = $default_domain[0];
! unset ($default_domain); // we kill this for security reasons
! $GLOBALS['login'] = get_var('login',Array('POST'));
! $GLOBALS['logindomain'] = get_var('logindomain',Array('POST'));
!
! /* This code will handle virtdomains so that is a user logins with
address@hidden, it will switch into virtualization mode. */
! if (isset($domain) && $domain)
! {
! $GLOBALS['phpgw_info']['user']['domain'] = $domain;
! }
! elseif (isset($GLOBALS['login']) && isset($GLOBALS['logindomain']))
{
! if (!ereg ("\@", $GLOBALS['login']))
{
! $GLOBALS['login'] = $GLOBALS['login'] . '@' .
$GLOBALS['logindomain'];
}
! $GLOBALS['phpgw_info']['user']['domain'] =
$GLOBALS['logindomain'];
! unset ($GLOBALS['logindomain']);
}
! elseif (isset($GLOBALS['login']) && !isset($GLOBALS['logindomain']))
{
! if (ereg ("\@", $GLOBALS['login']))
! {
! $login_array = explode('@', $GLOBALS['login']);
! $GLOBALS['phpgw_info']['user']['domain'] =
$login_array[1];
! }
! else
! {
! $GLOBALS['phpgw_info']['user']['domain'] =
$GLOBALS['phpgw_info']['server']['default_domain'];
! $GLOBALS['login'] = $GLOBALS['login'] . '@' .
$GLOBALS['phpgw_info']['user']['domain'];
! }
}
--- 100,117 ----
}
reset($GLOBALS['phpgw_domain']);
! list($GLOBALS['phpgw_info']['server']['default_domain']) =
each($GLOBALS['phpgw_domain']);
! if (isset($_POST['login'])) // on login
{
! $GLOBALS['login'] = $_POST['login'];
! if (strstr($GLOBALS['login'],'@') === False)
{
! $GLOBALS['login'] .= '@' .
get_var('logindomain',array('POST'),$GLOBALS['phpgw_info']['server']['default_domain']);
}
! list(,$GLOBALS['phpgw_info']['user']['domain']) =
explode('@',$GLOBALS['login']);
}
! else // on "normal" pageview
{
! $GLOBALS['phpgw_info']['user']['domain'] = get_var('domain',
array('GET', 'COOKIE'), FALSE);
}
***************
*** 154,158 ****
unset ($GLOBALS['phpgw_domain']); // we kill this for security
reasons
}
- unset ($domain); // we kill this to save memory
@print_debug('domain',$GLOBALS['phpgw_info']['user']['domain'],'api');
--- 137,140 ----
***************
*** 233,236 ****
--- 215,224 ----
unset($server_info_cache);
+ if(@isset($GLOBALS['phpgw_info']['server']['enforce_ssl']) && !$HTTPS)
+ {
+ Header('Location: https://' .
$GLOBALS['phpgw_info']['server']['hostname'] .
$GLOBALS['phpgw_info']['server']['webserver_url'] . $_SERVER['REQUEST_URI']);
+ exit;
+ }
+
/************************************************************************\
* Required classes
*
***************
*** 290,303 ****
if ($GLOBALS['phpgw_info']['flags']['currentapp'] == 'login')
{
!
if(@isset($GLOBALS['phpgw_info']['server']['enforce_ssl']) &&
$GLOBALS['phpgw_info']['server']['enforce_ssl'] &&
!$GLOBALS['HTTP_SERVER_VARS']['HTTPS'])
! {
!
$GLOBALS['phpgw']->redirect($GLOBALS['HTTP_SERVER_VARS']['REQUEST_URI']);
! }
! if (@$login != '')
{
! $login_array = explode("@",$login);
! print_debug('LID : '.$login_array[0],
'messageonly','api');
! $login_id =
$GLOBALS['phpgw']->accounts->name2id($login_array[0]);
! print_debug('User ID : '.$login_id,
'messageonly','api');
$GLOBALS['phpgw']->accounts->accounts($login_id);
$GLOBALS['phpgw']->preferences->preferences($login_id);
--- 278,287 ----
if ($GLOBALS['phpgw_info']['flags']['currentapp'] == 'login')
{
! if (@$_POST['login'] != '')
{
! list($login) = explode("@",$_POST['login']);
! print_debug('LID',$login,'app');
! $login_id =
$GLOBALS['phpgw']->accounts->name2id($login);
! print_debug('User ID',$login_id,'app');
$GLOBALS['phpgw']->accounts->accounts($login_id);
$GLOBALS['phpgw']->preferences->preferences($login_id);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.172,1.173,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions.inc.php,1.104,1.105 class.sessions_db.inc.php,1.16,1.17class.sessions_php4.inc.php,1.19,1.20
- Next by Date:
[Phpgroupware-cvs] CVS: phpgwapi/setup phpgw_br.lang,1.7,1.8 phpgw_cs.lang,1.10,1.11 phpgw_da.lang,1.13,1.14 phpgw_de.lang,1.36,1.37 phpgw_en.lang,1.58,1.59 phpgw_es.lang,1.13,1.14 phpgw_fi.lang,1.2,1.3 phpgw_fr.lang,1.24,1.25 phpgw_hu.lang,1.8,1.9 phpgw_it.lang,1.14,1.15 phpgw_ja.lang,1.12,1.13 phpgw_ko.lang,1.7,1.8 phpgw_nl.lang,1.11,1.12 phpgw_no.lang,1.8,1.9 phpgw_pl.lang,1.3,1.4 phpgw_pt.lang,1.3,1.4 phpgw_sv.lang,1.10,1.11 phpgw_zt.lang,1.5,1.6 setup.inc.php,1.57,1.58 tables_current.inc.php,1.45,1.46 tables_update.inc.php,1.70,1.71
- Previous by thread:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions.inc.php,1.104,1.105 class.sessions_db.inc.php,1.16,1.17class.sessions_php4.inc.php,1.19,1.20
- Next by thread:
[Phpgroupware-cvs] CVS: phpgwapi/setup phpgw_br.lang,1.7,1.8 phpgw_cs.lang,1.10,1.11 phpgw_da.lang,1.13,1.14 phpgw_de.lang,1.36,1.37 phpgw_en.lang,1.58,1.59 phpgw_es.lang,1.13,1.14 phpgw_fi.lang,1.2,1.3 phpgw_fr.lang,1.24,1.25 phpgw_hu.lang,1.8,1.9 phpgw_it.lang,1.14,1.15 phpgw_ja.lang,1.12,1.13 phpgw_ko.lang,1.7,1.8 phpgw_nl.lang,1.11,1.12 phpgw_no.lang,1.8,1.9 phpgw_pl.lang,1.3,1.4 phpgw_pt.lang,1.3,1.4 phpgw_sv.lang,1.10,1.11 phpgw_zt.lang,1.5,1.6 setup.inc.php,1.57,1.58 tables_current.inc.php,1.45,1.46 tables_update.inc.php,1.70,1.71
- Index(es):