From: <ny...@us...> - 2010-10-06 18:48:28
|
Revision: 29836 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=29836&view=rev Author: nyloth Date: 2010-10-06 18:48:21 +0000 (Wed, 06 Oct 2010) Log Message: ----------- [FIX] CAS authentication: Keep cas=y argument for the login page when redirect to https or http. Modified Paths: -------------- branches/6.x/tiki-login.php Modified: branches/6.x/tiki-login.php =================================================================== --- branches/6.x/tiki-login.php 2010-10-06 17:55:39 UTC (rev 29835) +++ branches/6.x/tiki-login.php 2010-10-06 18:48:21 UTC (rev 29836) @@ -7,7 +7,10 @@ $bypass_siteclose_check = 'y'; require_once ('tiki-setup.php'); +$login_url_params = ''; + if (isset($_REQUEST['cas']) && $_REQUEST['cas'] == 'y' && $prefs['auth_method'] == 'cas') { + $login_url_params = '?cas=y'; $_REQUEST['user'] = ''; } elseif (!(isset($_REQUEST['user']) or isset($_REQUEST['username']))) { if (!$https_mode && $prefs['https_login'] == 'required') { @@ -27,12 +30,12 @@ // Redirect to HTTPS if we are not in HTTPS but we require HTTPS login if (!$https_mode && $prefs['https_login'] == 'required') { - header('location: ' . $base_url_https . $prefs['login_url']); + header( 'Location: ' . $base_url_https . $prefs['login_url'] . $login_url_params ); exit; } // Redirect to HTTP if we are in HTTPS but we doesn't allow HTTPS login if ($https_mode && $prefs['https_login'] == 'disabled') { - header('location: ' . $base_url_http . $prefs['login_url']); + header( 'Location: ' . $base_url_http . $prefs['login_url'] . $login_url_params ); exit; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |