Forum: Ruby on Rails session / cookie confusion

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
22bb6be0cf01f0fc77d2bd61339cecd9?d=identicon&s=25 msp (Guest)
on 2009-04-09 00:40
(Received via mailing list)
Hi list

I'm in need of a little clarification. I thought that value set in the
ApplicationController
would result in a session cookie being created that is unique for that
user's session i.e. until the browser is closed?

session :session_key => '_myapp_session_id'

I am seeing the same cookies[:'_myapp_session_id'] value reported
across different browsers, with different sessions on different
machines.

Can anyone explain or correct my misundestanding?

Thanks muchly

Matt

(rails 2.2.2 under passenger)
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-04-09 00:47
(Received via mailing list)
On Apr 8, 11:38 pm, msp <matt.spendl...@gmail.com> wrote:
> Hi list
>
> I'm in need of a little clarification. I thought that value set in the
> ApplicationController
> would result in a session cookie being created that is unique for that
> user's session i.e. until the browser is closed?

What do you mean by set ?
>
> session :session_key => '_myapp_session_id'
>
> I am seeing the same cookies[:'_myapp_session_id'] value reported
> across different browsers, with different sessions on different
> machines.
>
> Can anyone explain or correct my misundestanding?

The default session store encodes the contents of the session itself
in the cookie (ie if different people end up storing the same thing in
the session they will end up with basically the same session cookie).

Fred
This topic is locked and can not be replied to.