From 6108e0524461d0a6f15940105d1fcbf7efc8f689 Mon Sep 17 00:00:00 2001
From: Jaime Perez Crespo <jaime.perez@uninett.no>
Date: Tue, 20 Jan 2015 10:58:50 +0100
Subject: [PATCH] Manually remove logout callbacks data from the session on the
 SP (instead of using SimpleSAML_Session::DATA_TIMEOUT_LOGOUT).

---
 lib/SimpleSAML/Auth/Source.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/SimpleSAML/Auth/Source.php b/lib/SimpleSAML/Auth/Source.php
index fb90d99c8..fb2b5a153 100644
--- a/lib/SimpleSAML/Auth/Source.php
+++ b/lib/SimpleSAML/Auth/Source.php
@@ -295,7 +295,7 @@ abstract class SimpleSAML_Auth_Source {
 
 		$session = SimpleSAML_Session::getSessionFromRequest();
 		$session->setData('SimpleSAML_Auth_Source.LogoutCallbacks', $id, $data,
-			SimpleSAML_Session::DATA_TIMEOUT_LOGOUT);
+			SimpleSAML_Session::DATA_TIMEOUT_SESSION_END);
 	}
 
 
@@ -331,6 +331,7 @@ abstract class SimpleSAML_Auth_Source {
 		$callback = $data['callback'];
 		$callbackState = $data['state'];
 
+		$session->deleteData('SimpleSAML_Auth_Source.LogoutCallbacks', $id);
 		call_user_func($callback, $callbackState);
 	}
 
-- 
GitLab