From: Tom Hughes Date: Thu, 23 Feb 2012 11:26:02 +0000 (+0000) Subject: Change session expiry to 28 days when "remember me" is set X-Git-Tag: live~6796 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/7c3a4b497e8f99d2642260ec604d111f4a866b01?ds=sidebyside Change session expiry to 28 days when "remember me" is set The expiry is passed directly to memcache, which treats any value over 30 days as an absolute time, so using 1 month leads to sessions expiring as soon as they are created. --- diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 7b3b596df..5c11a5c75 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -624,7 +624,7 @@ private cookies.permanent["_osm_username"] = user.display_name session[:user] = user.id - session_expires_after 1.month if session[:remember_me] + session_expires_after 28.days if session[:remember_me] target = session[:referer] || url_for(:controller => :site, :action => :index)