Bugs: Browse | Submit New | Admin

[#9957] Unable to create new (cgi) sessions by giving session_id in option.

Date:
2007-04-08 13:45
Priority:
3
Submitted By:
Tuure Laurinolli (tazle)
Assigned To:
Akinori MUSHA (knu)
Category:
Network / Comm / Protocols
State:
Open
Platform:
 
Summary:
Unable to create new (cgi) sessions by giving session_id in option.

Detailed description
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: Notepad

Please login


Followup

Message
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.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
assigned_tonone2007-06-12 02:25zenspider
category_idMisc / Other Standard Library2007-05-29 21:33zenspider
summaryUnable to create new sessions by giving session_id in option.2007-05-29 21:24zenspider