You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Christian Hauser <ad...@itassistance.ch> on 2004/03/19 16:40:23 UTC

uniqueness of Apache::Session ID

Basel, Freitag, 19. März 2004, 16:32:45
.....................................

*uniqueness of Apache::Session ID*


Hello ModPerl List


I'm just using again Apache::Session but in a more critical environment.
Therefore I thought about uniqueness of an Apache::Session ID generated
via MD5.

Basically I'm happy with that. Then I thought when I set the field
id of the session table (Apache::Session::mysql) to unique I'm really
on the save side.

Then I checked the code of Session.pm and saw something as sub EXISTS
which not seem to be used before saving with a new ID coming from
generate.

Before rewriting generate to have a case where the ID's are the same,
I ask here what Apache::Session does when an ID just generated
already exists?

Probably this will never happen, as I clean up the session table daily
but I just want to be sure not getting that once in a year (decade ;-) DBI
exception error ... Thanks for input.

.....................................

Best Regards, Christian -  administrator@itassistance.ch  -





-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: uniqueness of Apache::Session ID

Posted by Perrin Harkins <pe...@elem.com>.
On Fri, 2004-03-19 at 10:40, Christian Hauser wrote:
> Before rewriting generate to have a case where the ID's are the same,
> I ask here what Apache::Session does when an ID just generated
> already exists?

It explodes.  Use mod_unique_id to generate your IDs instead.  There is
a module for integrating it with Apache::Session.

- Perrin


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html