When I logout (delete a session), application gives me other value for
the Set-Cookie header.
But, on every next login and logout application sets the SAME value
for Set-Cookie header.
And, when I use db session based store, application always sets
different values for Set-Cookie header, which is better behavior.
I think, when using cookie based session store, application should set
different values for Set-Cookie header, maybe add some hashed
timestamp to the Set-Cookie value in case to recognize by it if the
session is some old, or it is the last one for.
When I logout (delete a session), application gives me other value for
the Set-Cookie header.
But, on every next login and logout application sets the SAME value
for Set-Cookie header.
with the database store the cookie value is just some identifier used
to look something up in a table. New session = new cookie value.
With the cookie store, the cookie value is the contents of the
session, so if the contents are the same the cookie will be the same.
The cookie store does not try and guard against replay of an old
session, you'll have to do that yourself.
You mean you want to decode the rails session cookie? it's just base64
encoded marshal data (up until the --, the rest is the signature)
Fred
No, I'm just trying to find way and make guard against replay of an
old session... so, probably I should play around with request and
response objects to change the defaults for Set-Cookie value that
rails app sets on the response object, and Cookie value that rails app
is supposed to receive from the client.
You mean you want to decode the rails session cookie? it's just
base64
encoded marshal data (up until the --, the rest is the signature)
Fred
No, I'm just trying to find way and make guard against replay of an
old session... so, probably I should play around with request and
response objects to change the defaults for Set-Cookie value that
rails app sets on the response object, and Cookie value that rails app
is supposed to receive from the client.
Just store a timestamp in the session and have a before filter that
checks it ?