diff --git a/www/saml2/sp/idpdisco.php b/www/saml2/sp/idpdisco.php index f6d5d852940d8740da6b0ced0f1bad6d6fc0e275..209dde975de9b75c7cc05f8ecba24990d679846c 100644 --- a/www/saml2/sp/idpdisco.php +++ b/www/saml2/sp/idpdisco.php @@ -23,12 +23,20 @@ $rememberEnabled = $config->getBoolean('idpdisco.enableremember', FALSE); try { if (!isset($_GET['entityID'])) throw new Exception('Missing parameter: entityID'); - if (!isset($_GET['return'])) throw new Exception('Missing parameter: return'); + if (!isset($_GET['returnIDParam'])) throw new Exception('Missing parameter: returnIDParam'); $spentityid = $_GET['entityID']; $return = $_GET['return']; - $returnidparam = $_GET['returnIDParam']; + + // Default value for "returnIDParam". Added to support Shibboleth 2.0 SP which does not + // send this parameter. + $returnidparam = 'idpentityid'; + + //if (!isset($_GET['return'])) throw new Exception('Missing parameter: return'); + if (isset($_GET['returnIDParam'])) { + $returnidparam = $_GET['returnIDParam']; + } } catch (Exception $exception) { SimpleSAML_Utilities::fatalError($session->getTrackID(), 'DISCOPARAMS', $exception);