Full-Bore Linear Panic

From: Date: Tue, 08 Aug 2000 20:07:15 +0000
Subject: Full-Bore Linear Panic
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-10780@lists.php.net to get a copy of this message
I just hit a large bug. As part of my authentication, I pass the browser a random cookie for use on the next page. I then get the cookie the browser sent me, and check the DB. If that cookie exists, then I write the new cookie for next time. If not, I do nothing, and the cookie I passed is not valid (since it didn't get written). That works fine.. Later in some scripts, I use the cookie value to pull up the user information. Here, it fails, UNLESS: I add in sleep(1) before the cookie check. In the failed case, when I check the cookie value I was looking for, it IS present in the databaase, and a manual query through MySQL confirms this. I can absolutely trigger this problem by removing the sleep statement before the second cookie check. It seems that when I stored the cookie, it didn't happen in time for the next part of the script to check. -- Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9

« previous php.general (#10780) next »