#50471 [Opn->Csd]: uniqid example is bad
| From: | kalle@php.net | Date: | Fri, 25 Dec 2009 00:24:52 +0000 |
| Subject: | #50471 [Opn->Csd]: uniqid example is bad | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-3557@lists.php.net to get a copy of this message | ||
ID: 50471
Updated by: kalle@php.net
Reported By: emery dot denuccio at gmail dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: Mac
PHP Version: 5.3.1
-Assigned To:
+Assigned To: kalle
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
I rewrote the examples for uniqid() without the use of a hashing,
simply showing the different types of output uniqid() produces.
Previous Comments:
------------------------------------------------------------------------
[2009-12-25 00:24:48] svn@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=292616
Log: Fixed bug #50471 (uniqid example is bad)
------------------------------------------------------------------------
[2009-12-14 17:28:00] emery dot denuccio at gmail dot com
Description:
------------
As many people have pointed out in the comments, MD5 hashing a UUID
simply reduces the randomness due to collisions. The example is
pointless / less secure.
Reproduce code:
---------------
---
From manual page: function.uniqid#Examples
---
Expected result:
----------------
...
Actual result:
--------------
...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50471&edit=1