Work round session expiry bug in rails 2.3.11
Rails uses :expire_after in the session options to specify when a sesssion should expire, but when Rack sets the cookie it expects to see :expires in the cookie options but Rails 2.3.11 fails to do the conversion so doesn't set the cookie expiry. To work around this, we set both options in the session options...
This commit is contained in:
parent
c4f7a8346a
commit
26b217c0ad
1 changed files with 1 additions and 2 deletions
|
@ -22,9 +22,8 @@ module SessionPersistence
|
|||
|
||||
def _persist_session
|
||||
if session[session_persistence_key]
|
||||
request.session_options = request.session_options.dup
|
||||
request.session_options[:expires] = Time.now + session[session_persistence_key]
|
||||
request.session_options[:expire_after] = session[session_persistence_key]
|
||||
request.session_options.freeze
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue