Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookies are signed and encrypte. #105

Conversation

KartikKumarSahoo
Copy link

Encrypts session cookie.

Encrypts session cookie.
@rails-bot
Copy link

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @rafaelfranca (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@KartikKumarSahoo KartikKumarSahoo changed the title Update active_record_store.rb Cookies are signed and encrypte. Apr 5, 2017
@@ -65,7 +65,7 @@ class ActiveRecordStore < ActionDispatch::Session::AbstractStore
end

private
def get_session(request, sid)
def get_session(request, sid) # NOTE: Doesn't get invoked.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this comment? I think it is called in versions of Rails before to 5.0


def write_session(request, sid, session_data, options)
logger.silence_logger do
sid ||= get_cookie(request)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to read the sid from the cookie? Is not it already passed to write_session?

@sikachu
Copy link
Member

sikachu commented Mar 1, 2019

I'm going to close this PR as it become stale. Going to use implementation in #140 instead.

Thank you for your patch.

@sikachu sikachu closed this Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants