Skip to content
Snippets Groups Projects
Commit e79b36e7 authored by Olav Morken's avatar Olav Morken
Browse files

www/saml2/idp/SSOService: Save RelayState in request restart URL.

Fixes issue 213

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1787 44740490-163a-0410-bde0-09ae8108e29a
parent 3b2f4e77
No related branches found
No related tags found
No related merge requests found
...@@ -271,6 +271,9 @@ if (isset($_REQUEST['SAMLRequest'])) { ...@@ -271,6 +271,9 @@ if (isset($_REQUEST['SAMLRequest'])) {
'Issuer' => $_GET['spentityid'], 'Issuer' => $_GET['spentityid'],
); );
if (isset($_GET['RelayState'])) {
$requestcache['RelayState'] = $_GET['RelayState'];
}
} else { } else {
SimpleSAML_Utilities::fatalError($session->getTrackID(), 'SSOSERVICEPARAMS'); SimpleSAML_Utilities::fatalError($session->getTrackID(), 'SSOSERVICEPARAMS');
...@@ -329,11 +332,16 @@ if($needAuth && !$isPassive) { ...@@ -329,11 +332,16 @@ if($needAuth && !$isPassive) {
/* The user will be redirected to this URL if the session is lost. This will cause an /* The user will be redirected to this URL if the session is lost. This will cause an
* unsoliced authentication response to be sent to the SP. * unsoliced authentication response to be sent to the SP.
*/ */
$sessionLostParams = array(
'spentityid' => $requestcache['Issuer'],
);
if (isset($requestcache['RelayState'])) {
$sessionLostParams['RelayState'] = $requestcache['RelayState'];
}
$sessionLostURL = SimpleSAML_Utilities::addURLparameter( $sessionLostURL = SimpleSAML_Utilities::addURLparameter(
$metadata->getGenerated('SingleSignOnService', 'saml20-idp-hosted'), $metadata->getGenerated('SingleSignOnService', 'saml20-idp-hosted'),
array( $sessionLostParams);
'spentityid' => $requestcache['Issuer'],
));
$hints = array( $hints = array(
'SPMetadata' => $metadata->getMetaData($requestcache['Issuer'], 'saml20-sp-remote'), 'SPMetadata' => $metadata->getMetaData($requestcache['Issuer'], 'saml20-sp-remote'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment