From 75c1b0374f22b7807fc61414ad03be4f8649aab8 Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Mon, 7 Mar 2011 13:27:00 +0000
Subject: [PATCH] saml: Handle empty RelayState the same as missing RelayState.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2763 44740490-163a-0410-bde0-09ae8108e29a
---
 modules/saml/lib/Auth/Source/SP.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/saml/lib/Auth/Source/SP.php b/modules/saml/lib/Auth/Source/SP.php
index f87fee50b..de71894e0 100644
--- a/modules/saml/lib/Auth/Source/SP.php
+++ b/modules/saml/lib/Auth/Source/SP.php
@@ -490,7 +490,7 @@ class sspmod_saml_Auth_Source_SP extends SimpleSAML_Auth_Source {
 		$state['Attributes'] = $authProcState['Attributes'];
 
 		if (isset($state['saml:sp:isUnsoliced']) && (bool)$state['saml:sp:isUnsoliced']) {
-			if (isset($state['saml:sp:RelayState'])) {
+			if (!empty($state['saml:sp:RelayState'])) {
 				$redirectTo = $state['saml:sp:RelayState'];
 			} else {
 				$redirectTo = $source->getMetadata()->getString('RelayState', '/');
-- 
GitLab