From 6060813316864e7e7bbe8a02b4858d3e27ca3000 Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Thu, 8 Oct 2009 08:13:06 +0000
Subject: [PATCH] saml2/sp/initSSO: Fix use of isPassive and ForceAuthn from
 metadata.

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

diff --git a/www/saml2/sp/initSSO.php b/www/saml2/sp/initSSO.php
index b9d1b3009..637f5273f 100644
--- a/www/saml2/sp/initSSO.php
+++ b/www/saml2/sp/initSSO.php
@@ -137,8 +137,12 @@ try {
 	$ar->setProtocolBinding(SAML2_Const::BINDING_HTTP_POST);
 	$ar->setRelayState($_REQUEST['RelayState']);
 
-	$ar->setIsPassive($isPassive);
-	$ar->setForceAuthn($forceAuthn);
+	if ($isPassive) {
+		$ar->setIsPassive(TRUE);
+	}
+	if ($forceAuthn) {
+		$ar->setForceAuthn(TRUE);
+	}
 
 	if(array_key_exists('IDPList', $spmetadata)) {
 		$IDPList = array_unique(array_merge($IDPList, $spmetadata['IDPList']));
-- 
GitLab