Re: [PHP4BETA] CVS update: php4/ext/session

From: Date: Mon, 07 Jun 1999 10:57:57 +0000
Subject: Re: [PHP4BETA] CVS update: php4/ext/session
References: 1 2  Groups: php.version4 
Request: Send a blank email to php-version4+get-1353@lists.php.net to get a copy of this message
On Sun, Jun 06, 1999 at 04:56:35PM -0400, Jim Winstead wrote: > On Jun 06, sas wrote: > > + * - improve session id creation to avoid collisions > > + * (make use of mersenne twister, other data such as IP, browser etc.) > > You should take a look at Apache's mod_unique_id. The algorithm > there should be fine. > > I don't think you should be using a random number at all in generating > these ids. You need to go with something deterministic so you can > guarantee no collisions, rather than just hoping you don't get any. Well, a hash algorithm with no collisions does not exist to the best of my knowledge. Hence, we can only hope that we don't produce any collisions. As Kristian said before, the algorithm must not be deterministic. Using some kind of randomness to make the ids unguessable is what I think I'll go for. I'll do some work on the user-level hooks as well today. -- Regards, Sascha Schumann Consultant

« previous php.version4 (#1353) next »