Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68610 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80764 invoked from network); 23 Aug 2013 00:33:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Aug 2013 00:33:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.45 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.128.45 mail-qe0-f45.google.com Received: from [209.85.128.45] ([209.85.128.45:41381] helo=mail-qe0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/30-11927-0CDA6125 for ; Thu, 22 Aug 2013 20:33:04 -0400 Received: by mail-qe0-f45.google.com with SMTP id 7so1482678qea.32 for ; Thu, 22 Aug 2013 17:33:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=BoZfLNGN9WZ+zVwsJ9dZQz/9b52TAAgCcc6jKWJOgdE=; b=Dw9nGn4oEug/9zgVGkVMLiGKcXsOpg1oKCGjtCn+1T8gjCfmuyr1Am2W9PYqZmFQEV PyzHpIjqLJcz3/PN5ftraf5OVmlcmvLgDfVSLcL+fI8wwPfRXKOvi0p6YVTBSYZlKQi+ AWroTSk1uXYmUKMfOLuxQ7LMcmzzkYcjos961JpsUoR95nZFfmcOCdYBqxuTjrAUtlxg rDKAl3a6P1ZytueVOcxbBFAmikzgrgg/2QZIa640EaxqUl5oh0IKDR2lcuTxVFWQ7Rdn dF66YsVNQTBE4FeLmHyOtB6ggJ3Fa/NcM37DsWTYhlk9AJbqiqoxIF9Bf5mHfupxfEPA o2HA== X-Received: by 10.49.81.176 with SMTP id b16mr18751973qey.3.1377217982039; Thu, 22 Aug 2013 17:33:02 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.224.100.70 with HTTP; Thu, 22 Aug 2013 17:32:20 -0700 (PDT) In-Reply-To: References: Date: Fri, 23 Aug 2013 09:32:20 +0900 X-Google-Sender-Auth: pib0IsqnGPu-rP7m6PXWmaRAKz0 Message-ID: To: Leigh Cc: Sebastian Krebs , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7b6dc3a4990d4404e4928c30 Subject: Re: [PHP-DEV] Request #65501 uniqid(): More entropy parameter should be true by default From: yohgaki@ohgaki.net (Yasuo Ohgaki) --047d7b6dc3a4990d4404e4928c30 Content-Type: text/plain; charset=UTF-8 On Thu, Aug 22, 2013 at 10:23 PM, Leigh wrote: > On 22 August 2013 13:39, Sebastian Krebs wrote: > >> Tbh I don't get the real problem with the _current_ behaviour. Who need >> the >> entropy, can set it as second parameter and I am not sure, if it is wise >> to >> use uniqid() for _security purposes_. >> > > It's absolutely not wise to use it for anything security related, the > purpose of the function is simply to provide a unique value within a > system, not a random value, not an unpredictable value. > I agree. However, I suppose there are many applications that rely on uniqid() for critical features like payment or authentication. We need better function as basic feature of PHP. unique_hash() or hash_unique() might be good. UUID works and is much better but generating unique hash just like session ID is trivial to implement. Any comments on this? -- Yasuo Ohgaki yohgaki@ohgaki.net --047d7b6dc3a4990d4404e4928c30--