Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98129 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11748 invoked from network); 2 Feb 2017 23:37:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Feb 2017 23:37:20 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ohgaki.net designates 180.42.98.130 as permitted sender) X-PHP-List-Original-Sender: yohgaki@ohgaki.net X-Host-Fingerprint: 180.42.98.130 ns1.es-i.jp Received: from [180.42.98.130] ([180.42.98.130:42702] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 21/21-51557-CA2C3985 for ; Thu, 02 Feb 2017 18:37:18 -0500 Received: (qmail 80519 invoked by uid 89); 2 Feb 2017 23:37:13 -0000 Received: from unknown (HELO mail-qt0-f176.google.com) (yohgaki@ohgaki.net@209.85.216.176) by 0 with ESMTPA; 2 Feb 2017 23:37:13 -0000 Received: by mail-qt0-f176.google.com with SMTP id x49so6784940qtc.2 for ; Thu, 02 Feb 2017 15:37:13 -0800 (PST) X-Gm-Message-State: AIkVDXKIhm9e0nCnszxfixIupY2afXPIp3gtmw4sQjGPxtk6ynyihVh/lQjYcNx/L1/wcfnZhZZbpDvbJy46DQ== X-Received: by 10.200.43.115 with SMTP id 48mr11243802qtv.157.1486078627294; Thu, 02 Feb 2017 15:37:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.19.232 with HTTP; Thu, 2 Feb 2017 15:36:26 -0800 (PST) In-Reply-To: References: <0D26A03B-6BEB-4730-8E4B-0F7D6835E683@thefsb.org> <8991137d8dd8ba915bcacd4fbc1fe88f@gmail.com> <1fa97f9f4d4c0866fb4b0f21fc68b068@gmail.com> <842237fd-7e2d-70b4-5e0b-754bcba1fcf8@gmx.de> Date: Fri, 3 Feb 2017 08:36:26 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Niklas Keller Cc: "Christoph M. Becker" , =?UTF-8?Q?Lauri_Kentt=C3=A4?= , Tom Worster , "internals@lists.php.net" , Leigh , Nikita Popov Content-Type: multipart/alternative; boundary=001a113f4434b04b6e054794a4b6 Subject: Re: [PHP-DEV] Re: Improving mt_rand() seed From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a113f4434b04b6e054794a4b6 Content-Type: text/plain; charset=UTF-8 Hi Niklas, On Thu, Feb 2, 2017 at 11:05 PM, Niklas Keller wrote: > 2017-02-02 14:24 GMT+01:00 Christoph M. Becker : > >> On 02.02.2017 at 12:51, Yasuo Ohgaki wrote: >> >> > Although users must never do this, but there are codes that generate >> random >> > password/access key by mt_rand(). >> >> There is also code that stores clear text passwords. How would you >> prevent that? >> >> IMHO, if users don't care to read the docs[1], it's their fault, and we >> shouldn't waste our time to fix their bugs. > > > While the documentation states that, it can still be improved. > > I've just submitted a patch, you can find the diff here: > https://gist.github.com/kelunik/bb534d4c4ede160d97ef17014052052a (linking > patches via edit.php.net doesn't really work, it just links to the newest > patch of a file and will break once merged). > Nice patch! I'm OK with your patch. Currently, mt_rand() value is affected by srand() in PHP 7.1. It may be described, but I think there will be new PRNG state for rand()/srand() at least, hopefully soon. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a113f4434b04b6e054794a4b6--