diff --git a/login.php b/login.php index 0f43a5b75d..4debe756b5 100755 --- a/login.php +++ b/login.php @@ -71,12 +71,12 @@ // If there is a problem, tell me and I will fix it. (jengo) // whoooo scaring - +/* if($GLOBALS['phpgw_info']['server']['usecookies'] == True) { $GLOBALS['phpgw']->sessions->phpgw_setcookie('eGroupWareLoginTime', time()); } - +*/ /* if($_GET['cd'] != 10 && $GLOBALS['phpgw_info']['server']['usecookies'] == False) { @@ -235,6 +235,11 @@ $extra_vars['cd'] = 'yes'; $forward = '/home.php'; } + else + { + list($forward,$extra_vars) = explode('?',$forward,2); + } + //echo "redirecting to ".$GLOBALS['phpgw']->link($forward,$extra_vars); $GLOBALS['phpgw']->redirect_link($forward,$extra_vars); } } diff --git a/phpgwapi/inc/functions.inc.php b/phpgwapi/inc/functions.inc.php index f99e2e3ac8..de1c6dc827 100644 --- a/phpgwapi/inc/functions.inc.php +++ b/phpgwapi/inc/functions.inc.php @@ -293,12 +293,12 @@ { if (! $GLOBALS['phpgw']->session->verify()) { + // we forward to the same place after the relogin list(,$relpath) = explode($GLOBALS['phpgw_info']['server']['webserver_url'],$_SERVER['PHP_SELF'],2); - $args = array( - 'cd' => 10, - 'phpgw_forward' => urlencode('/'.$relpath.(isset($_SERVER['QUERY_STRING']) ? '?'.$_SERVER['QUERY_STRING'] : '')) - ); - $GLOBALS['phpgw']->redirect_link('/login.php',$args); + // this removes the sessiondata if its saved in the URL + $query = preg_replace('/[&]?sessionid=[^&]+&kp3=[^&]+&domain=.*$/','',$_SERVER['QUERY_STRING']); + Header('Location: '.$GLOBALS['phpgw_info']['server']['webserver_url'].'/login.php?cd=10&phpgw_forward='.urlencode($relpath.(!empty($query) ? '?'.$query : ''))); + exit; } $GLOBALS['phpgw']->datetime = CreateObject('phpgwapi.datetime');