From 10d7a75f3a7f2589afb3ca7e8a3eb53d7b0a5c2b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no>
Date: Mon, 16 Jun 2008 11:53:39 +0000
Subject: [PATCH] ADded: Default value for "returnIDParam". Added to support
 Shibboleth 2.0 SP which does not

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@661 44740490-163a-0410-bde0-09ae8108e29a
---
 www/saml2/sp/idpdisco.php | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/www/saml2/sp/idpdisco.php b/www/saml2/sp/idpdisco.php
index f6d5d8529..209dde975 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);
-- 
GitLab