Bugs: Browse | Submit New | Admin
Creating a new session fails because session.new_session is not set to true when option['session_id'] is set and option['new_session'] is set to true. If option['new_session'] is set to false, creating new session fails as expected, and it option['session_id'] is not set, but option['new_session'] is set, creating new session succeeds with a random ID as expected, because the method that generated the random ID sets session.new_session to true.
Add A Comment:
Date: 2007-07-03 06:05 Sender: Jaime Cham I am also running into this problem. Another error/wrinkle would also be the handling of the case in which option['session_id'] is not set/nil, since the documentation states that it should create a session if one doesn't exist. Complicating things is the fact that the storage classes (e.g. PStore and ActiveRecordStore in Rails) check the value as: unless session.new_session raise CGI::Session::NoSession, 'uninitialized session' end @session = @@session_class.new(:session_id => session_id, :data => {}) So what's the right thing to do here?
Date: 2007-04-08 13:46 Sender: Tuure Laurinolli And now that I read the report again, I notice I never mentioned what sessions I'm talking about. The sessions in question are CGI::Sessions.