From 096162d5b4e84a8a3cba5951a707e66968c461fb Mon Sep 17 00:00:00 2001 From: Robert Tefft <bobtefft@gmail.com> Date: Tue, 13 Mar 2018 16:07:07 -0400 Subject: [PATCH] change redis store expire time to duration seconds instead of timestamp --- lib/SimpleSAML/Store/Redis.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/SimpleSAML/Store/Redis.php b/lib/SimpleSAML/Store/Redis.php index 2f568e360..d102b01fd 100644 --- a/lib/SimpleSAML/Store/Redis.php +++ b/lib/SimpleSAML/Store/Redis.php @@ -98,7 +98,8 @@ class Redis extends Store if ($expire === null) { $this->redis->set("{$type}.{$key}", $serialized); } else { - $this->redis->setex("{$type}.{$key}", $expire, $serialized); + // setex expire time is in seconds (not unix timestamp) + $this->redis->setex("{$type}.{$key}", $expire - time(), $serialized); } } -- GitLab