note 69350 added to function.uniqid

From: Date: Fri, 01 Sep 2006 16:31:58 +0000
Subject: note 69350 added to function.uniqid
Groups: php.notes 
Request: Send a blank email to php-notes+get-116592@lists.php.net to get a copy of this message
In answer to admin at code-dynasty dot net: First, I believe that the odds of collision of MD5 aren't higher than those of the uniqid itself. In any case, I don't like using session id by itself to identify a user. I like to check user's IP address ($_SERVER['REMOTE_ADDR']). If by chance session id is duplicated, I wonder what are the odds of the match appering from the same IP? There are good points for using MD5 over uniqid. MD5 makes the length of the uniqid predictable, which is easier depending of the way you use the session id. MD5 hides how you've created the session id (they can't even tell you've used uniqid), which makes it harder for an attacker to predict future ids. ---- Server IP: 66.207.199.35 Probable Submitter: 66.130.83.167 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.uniqid.php Edit -- https://master.php.net/note/edit/69350 Del: integrated -- https://master.php.net/note/delete/69350/integrated Del: useless -- https://master.php.net/note/delete/69350/useless Del: bad code -- https://master.php.net/note/delete/69350/bad+code Del: spam -- https://master.php.net/note/delete/69350/spam Del: non-english -- https://master.php.net/note/delete/69350/non-english Del: in docs -- https://master.php.net/note/delete/69350/in+docs Del: other reasons-- https://master.php.net/note/delete/69350 Reject -- https://master.php.net/note/reject/69350 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#116592) next »