Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8975191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:48:55+00:00 2026-06-15T18:48:55+00:00

According to this question , session can be edited by user. But this answer

  • 0

According to this question, session can be edited by user. But this answer suggests it’s safe to store user id.

From Rails document

A message digest is included with the cookie to ensure data integrity: a user cannot alter his user_id without knowing the secret key included in the hash

With <%= debug(session) %> embedded in my page and the session value in Chrome’s Developer tools, I can’t find the message digest in the session cookie. If I login as user A and then login as user B, the session cookie remains the same excecpt user_id value.

So where is the message digest or do I need some configuration? The auto-generated secret_token exists in config/initializers/secret_token.rb. Is it stored in the server’s memory and hash the session value on every request?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:48:56+00:00Added an answer on June 15, 2026 at 6:48 pm

    The message digest is part of the cookie value. It’s not part of the data you get in the session.

    You can see it if you inspect the raw cookie value in chrome – the digest is separated from the payload by a ‘–‘

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to this question it seems like you can do this for Methods. What
According to this question I succeeded to create upload image, but now I need
According to this question's answer : According to the standards you must define i
According to this question in order for Flymake to work you must add a
I didnt find anything according this issue. Can jaas be used to secure my
According to this post in Recursive Descent vs. LALR , any LALR(k) can be
This question will undoubtedly be difficult to answer and ask in a way that
i got a question in DQL how to pass session User id $vars['mood'] =
this question is according to this topic: creating a huge dummy file in a
I am relatively new to ruby on rails, so this question might be easy.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.