From 28552e0be613e4934bc67f23975a4f797ecb0d4b Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Fri, 24 Jul 2009 10:38:28 +0000
Subject: [PATCH] authmemcookie: Set expiry time of session data when saving to
memcache.
Patch by Ernesto Revilla.
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1594 44740490-163a-0410-bde0-09ae8108e29a
---
www/authmemcookie.php | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/www/authmemcookie.php b/www/authmemcookie.php
index fa6c40e05..db8ab9a00 100644
--- a/www/authmemcookie.php
+++ b/www/authmemcookie.php
@@ -103,7 +103,8 @@ try {
$memcache = $amc->getMemcache();
- $memcache->set($sessionID, $data);
+ $expirationTime = $session->remainingTime();
+ $memcache->set($sessionID, $data, 0, $expirationTime);
/* Register logout handler. */
$session->registerLogoutHandler('SimpleSAML_AuthMemCookie', 'logoutHandler');
@@ -113,5 +114,3 @@ try {
} catch(Exception $e) {
SimpleSAML_Utilities::fatalError($session->getTrackID(), 'CONFIG', $e);
}
-
-?>
\ No newline at end of file
--
GitLab