Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

MemCacheStore allows for arbitrary client generated session_ids?

#3134

Maybe it's just late at night, and I'm going crazy... but it seems to me that MemCacheStore allows for the client to decide what session_id it wants to use. All the a user has to do is edit his session_id cookie to be whatever he wants it to be and Rails will use it. Is this even a problem to worry about?

Would it make sense to HMAC the session_id with some sort of server-side secret? session_options[:secret] isn't even being used for MemCacheStore.

I saw ticket #571... didn't seem to answer the question though.

Reported by Aaron Gibralter · September 2nd, 2009 @ 08:28 AM

State: open
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Kevin Menard
    Kevin Menard
    • Importance changed from to

    I think it's definitely something to worry about. We had legitimate issues as a result of this behavior. But, since the core team stance (per #571) seems to be that it's not a problem, we just patched it locally. I guess if you think it's unlikely that a user could ever guess another's session ID or that two users modifying their session IDs would ever pick the same one, then it's probably not an issue. But, we saw otherwise.

    July 13th, 2010 @ 01:53 PM

  2. Aaron Gibralter
    Aaron Gibralter

    Would you mind posting your patch?

    July 13th, 2010 @ 05:23 PM

  3. Santiago Pastorino
    Santiago Pastorino
    • State changed from new to open

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

    February 2nd, 2011 @ 04:36 PM

  4. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to stale

    February 2nd, 2011 @ 04:36 PM

  5. Aaron Gibralter
    Aaron Gibralter

    Does anyone else think it makes sense for Rails to HMAC the session_ids it creates with a timestamp and a secret? This way people would not be able to brute force their way into hijacking sessions...

    February 14th, 2011 @ 02:53 PM

  6. Aaron Gibralter
    Aaron Gibralter
    • State changed from stale to open

    oops forgot: [state:open]

    February 14th, 2011 @ 02:54 PM