similar to: How to get session's cookie string

Displaying 20 results from an estimated 70000 matches similar to: "How to get session's cookie string"

2007 Mar 01
4
Cookie based session management problems
Edge has a change in default behaviour where sessions are stored as cookies instead of in the file system. This was a pleasant surprise when I synced up, fired up my app, and nothing worked. Ah, life on the edge. I''m sure I''m just missing something, but I can''t get sessions to survive the first redirect. I added the following code to environment.rb, based on
2008 Jun 19
5
How do you create one session cookie for multiple subdomains
I am using the restful authentication plugin and am always prompted to login if a different subdomain is accessed. I have found a couple rails "solutions", but none of them seem to work: # development.rb 1. ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:session_key] = ".localhost" 2. ActionController::Base.session_options[:key] = ".localhost" Does anyone
2007 Sep 17
0
keep sessions while switching domains
Hello, Our rails app has several domains. We are now implementing a single https connection https://secure.domain.xx. All other domains need to switch to that new secure domain in certain circumstances. We only have one ssl cert and it is not possible to create and use a ssl cert for all domains! Now when switching domains we loose the session, that was previously used and I was not able to
2008 May 27
1
session question - unique identifier in cookie store?
Hi, I recently switched to the cookie session store for my rails app, and I am wondering how I can access some kind of unique identifier for each session between requests. It used to be (when I was using active record store) that the session id was set and that string didn''t change between requests. Now, of course, the session id does change between requests because that is where the
2009 Feb 19
1
Switching to ActiveRecord Session Store
I''m having a problem switching from cookie sessions (the default) to active record sessions. I''ve created the sessions table via the rake task, uncommented the line config.action_controller.session_store = :active_record_store in my environment.rb file, cleared out my browsers cookies, restarted the server (natch), but still the it''s using cookie_store instead of
2009 Oct 13
1
config.action_controller.session[:secret] vs protect_from_forgery :secret
What I want to do is share the same session across many Rails applications. All of them are using Rails 2.2.2. I know that, to share the session, it''s (supposedly) just a matter of sharing the same key and secret among the apps, like this: config.action_controller.session = { :session_key => ''_apps_session'', :secret =>
2006 Nov 14
0
where does rails pull the session id from the cookie and connect the request with the session?
i was hoping someone could point me to the place where rails is using the cookie to match the request to the session. i see some session logic in cgi/session, but i can''t seem to find where it actually uses the cookie. fyi, i''m asking because i''m having an issue where i set the user during login, but the redirect following the login is using (or creating) a different
2006 Feb 19
0
Re: can store array or hash in cookies?
Not a bug. A cookie is just a string. You can turn anything into a string and store it in a cookie. Something very simple like the following might work for you: array_for_cookie = [1,4,5,7] cookies[:foo] = array_for_cookie .to_s array_from_cookie = cookies[:foo][1..-2].split('','') (And if you are just storing a single integer in a cookie be sure to turn it into a
2008 Feb 09
1
how to check the config.action_controller.session options ?
when setting it in my environment.rb config.action_controller.session = { :session_key => ''_myapp_session'', :secret => ''3a64394bb895f1f05e0c07f71127d93d'' } I cannot get it back in the script/console .. :session_key=>"_session_id" !!! why ? >> ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS =>
2008 Aug 21
0
session cookie missing
I am running RAILS 1.2.6 with apache balancing between a cluster of mongrel processes. It appears that intermittently the server is not receiving the session cookie from the browser for certain users. Wondering what situations could cause this... I know one is if the user has cookies turned off. Are there other situations where this could arise? The net effect is that users experiencing this
2007 Mar 30
0
Storing an order object in a cookie based session
I have a simple e-commerce store and am running into a problem with the edge rails cookie based sessions. What I am trying to do is make the customer fill in their info, and click "Review my Order". The order object is contructed, and stored in the session (if it passes validation). The is sent to another page where they can confirm all their info and press the "finalize
2006 Nov 23
0
Cookie Implementation
Hi, I am trying to remember certain information like username using cookies so that when the same page is accessed again, some default settings can be maitained.I am facing a problem when reading the cookie value. The steps that I follow are: 1. Click a button in a view which will pass the control to a controller. 2. In the controller, the username which as passed as a parameter is saved in a
2006 Jan 07
2
can store array or hash in cookies?
Hi According to rdoc: value - the cookie''s value or list of values (as an array). So, I can use arrays, briliant. But.... It does not work (at least on webrick) I wrote a controller: def check_cookies_first cookies[:chef] = {:value => ["first", "second"], :expires => Time.local (2020)} render_text ":)" end def
2008 Jun 24
1
cross domain cookie
My rails server runs on localhost. I want to set a cookie for the domain ".myapp.com". How do I do this? (i tried cookies[''xyz] = {:value => ''abc'' ,:domain => ''.myapp.com''} . It doesnt work. No cookie is being set when i specify domain like that. thanks in advance. --~--~---------~--~----~------------~-------~--~----~ You received this
2008 Jan 03
1
help - updated from 1.2.5 to 1.2.6 and getting undefined method 'session=' for ActionController::base
i start the server but it exits right away, I ran the rake to update and changed the version string in config.rb. Any thoughts on this matter would be appreciated. i imagine that it has something to do with the session, but i am not able to figure it out. my config/config.rb has the following config.action_controller.session = { :session_key => ''c3_rails_session'',
2007 May 10
5
Setting P3P header before Set-Cookie
Hi folks, For a project I''m working on, I need to set an HTTP header BEFORE the Set-Cookie header is sent. Basically, I need to send along our compact privacy policy before the cookie is set. I''ve tried using: @headers[''P3P''] = "P3P: blah blah blah..." ...but the problem is that no matter what I do, the Set-Cookie header is sent first, and the P3P
2012 Apr 25
8
showing error (gsub) when switching from session to cookies
I am newbie to rail. Trying to develop social networking site so working with railspace application. Everything is working fine but I stuck in the problem when i am giving the authorization tocken to the user to remember him/her. My Error and controller code is below Error:- private method `gsub'' called for 4:Fixnum C:/Users/Amir/Downloads/IR/ruby/lib/ruby/1.8/cgi.rb:342:in
2006 Sep 06
1
Problem changing cookie expiration
I''m trying to set the cookie expiration in my environment.rb file but I keep getting a syntax error on WeBRICK startup. I''m trying both of the ways listed in http://wiki.rubyonrails.org/rails/pages/HowtoChangeSessionOptions. FYI I''m new to rails so this is probably easy. 1) ActionController::Base.session_options[:session_expires] = Time.local(2008,"jan"))
2007 Dec 23
3
InvalidAuthenticityToken problems with my login form
I am trying to convert my codeand to use the new Rails 2.0 feature RequestForgeryProtection but I get an InvalidAuthenticityToken error, right from the beginning with my login form.. I followed the recommandations : in my environment.rb config.action_controller.session = { :session_key => ''myappname'', :secret =>
2007 Aug 09
0
TypeError: $_ value need to be String (nil given)
Hello all, I am trying to run a unit test in a Rails project of mine (Rails 1.2.2, Ruby 1.8.4 (2005-12-24) [i486-linux]), and am running into the following error: 1) Error: test_pattern_splits(PatternSplitTest): TypeError: $_ value need to be String (nil given) /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ validations.rb:74:in `split''