From 20831c763400221567d3119131c2311497c71808 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Fri, 25 Oct 2013 18:45:23 +0200 Subject: [PATCH] bug #2400: Fix expiration time for mencache. When the expiration time specified is 30 days or more in seconds, Memcache treats the expiration as an absolute date by converting the amount of seconds specified to a Unix epoch date. Be careful, because specifying 40 days in seconds will set the expiration to a time in 1970, which will yield unknown results. --- src/sunstone/sunstone-server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sunstone/sunstone-server.rb b/src/sunstone/sunstone-server.rb index 167bcdd30a..8b013249ca 100755 --- a/src/sunstone/sunstone-server.rb +++ b/src/sunstone/sunstone-server.rb @@ -202,7 +202,7 @@ helpers do #end user options if params[:remember] == "true" - env['rack.session.options'][:expire_after] = 30*60*60*24 + env['rack.session.options'][:expire_after] = 30*60*60*24-1 end return [204, ""]