When trying to establish if a session is active in shibboleth.php the function shibboleth_session_active is checking for session headers which in my environment don't exist.
Here is the function in question:
/**
* Check if a Shibboleth session is active.
*
* @return boolean if session is active
* @uses apply_filters calls 'shibboleth_session_active' before returning final result
*/
function shibboleth_session_active() {
$active = false;
$session_headers = array('Shib-Session-ID', 'HTTP_SHIB_IDENTITY_PROVIDER');
foreach ($session_headers as $header) {
if ( array_key_exists($header, $_SERVER) && !empty($_SERVER[$header]) ) {
$active = true;
break;
}
}
$active = apply_filters('shibboleth_session_active', $active);
return $active;
}
I managed to get the plugin to work by changing the code to
/**
* Check if a Shibboleth session is active.
*
* @return boolean if session is active
* @uses apply_filters calls 'shibboleth_session_active' before returning final result
*/
function shibboleth_session_active() {
$active = false;
$session_headers = array('Shib_Session_ID', 'HTTP_SHIB_IDENTITY_PROVIDER');
foreach ($session_headers as $header) {
if ( array_key_exists($header, $_SERVER) && !empty($_SERVER[$header]) ) {
$active = true;
break;
}
}
$active = apply_filters('shibboleth_session_active', $active);
return $active;
}
Without this change any attempt at using Shib would cauase a loop with the idp. Has anyone else seen this?