This project is archived and is in readonly mode.
Can't get valid session key via request.session_options[:key] when using CookieStore
-
Neeraj Singh
@Brian: Can you show the code that you put in session_store.rb to get full picture?
-
brian
my session_store.rb is like this
ActionController::Base.session = { :key => '_waffle_session', :secret => 'xxxxxxxx', }and my production.rb is like this
#config.action_controller.session_store = :mem_cache_store config.action_controller.session = { :key => "_waffle_session", :secret => 'xxxxxxxx(same with secret in session_store.rb)', # :expires => 3600, :cookie_only => false, # :cache => CACHE, }thank you
-
dr
I'm having a similar issue. That is, you don't seem to be able to set the session options because session_options isn't being passed down to AbstractStore.
Setting
Rails.application.config.session_options[:key] = 'something_other_than_session_id'
doesn't change the cookie name
-
dr
Okay, I dug a little deeper and see in Rails 3 that should be:
Rails.application.config.session_store :active_record_store, { :key => 'something_other_than_session_id' }Which works for :cookie_store, but not for :active_record_store.
Adding:
def initialize(app, options = {}) super endto ActiveRecord::SessionStore fixes the problem. Although I don't see why it's necessary.
-
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.
-
Santiago Pastorino
- State changed from open to stale
-
ssupreme11
Its my first time to visit this site and as I was exploring I cant believe that this site was made up of a very informative articles that you should try to have compliment with so as what I am doing now I really love to look forward with more interesting information on this site.. Buy Dissertation