From 6fd675ea325dea9905cbcaddc37aee51fe04d596 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaime=20P=C3=A9rez=20Crespo?= <jaime.perez@uninett.no>
Date: Thu, 13 Dec 2012 13:08:44 +0000
Subject: [PATCH] Fix for SLO in WS-Fed.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3213 44740490-163a-0410-bde0-09ae8108e29a
---
 www/wsfed/sp/prp.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/www/wsfed/sp/prp.php b/www/wsfed/sp/prp.php
index d2fea79ca..06c1aa5cc 100644
--- a/www/wsfed/sp/prp.php
+++ b/www/wsfed/sp/prp.php
@@ -24,7 +24,12 @@ if (!$config->getBoolean('enable.wsfed-sp', false))
 	throw new SimpleSAML_Error_Error('NOACCESS');
 
 if (!empty($_GET['wa']) and ($_GET['wa'] == 'wsignoutcleanup1.0')) {
-	print 'Logged Out';
+	if (isset($session) && $session->isValid('wsfed')) {
+		$session->doLogout('wsfed');
+	}
+	if (!empty($_GET['wreply'])) {
+		SimpleSAML_Utilities::redirect(urldecode($_GET['wreply']));
+	}
 	exit;
 }
 
-- 
GitLab