Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87203 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33053 invoked from network); 16 Jul 2015 16:20:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jul 2015 16:20:09 -0000 Authentication-Results: pb1.pair.com header.from=brian@moonspot.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=brian@moonspot.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain moonspot.net designates 173.203.187.75 as permitted sender) X-PHP-List-Original-Sender: brian@moonspot.net X-Host-Fingerprint: 173.203.187.75 smtp75.iad3a.emailsrvr.com Linux 2.6 Received: from [173.203.187.75] ([173.203.187.75:56952] helo=smtp75.iad3a.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9B/D1-16799-6B9D7A55 for ; Thu, 16 Jul 2015 12:20:08 -0400 Received: from smtp10.relay.iad3a.emailsrvr.com (localhost.localdomain [127.0.0.1]) by smtp10.relay.iad3a.emailsrvr.com (SMTP Server) with ESMTP id 460B52805C9; Thu, 16 Jul 2015 12:20:04 -0400 (EDT) Received: by smtp10.relay.iad3a.emailsrvr.com (Authenticated sender: brian-AT-moonspot.net) with ESMTPSA id E4EB328058A; Thu, 16 Jul 2015 12:20:03 -0400 (EDT) X-Sender-Id: brian@moonspot.net Received: from Adrastea.local (71-45-12-44.res.bhn.net [71.45.12.44]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:465 (trex/5.4.2); Thu, 16 Jul 2015 16:20:04 GMT Message-ID: <55A7D993.5000301@moonspot.net> Date: Thu, 16 Jul 2015 11:19:31 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Sammy Kaye Powers , PHP Internals References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Core functions throwing exceptions in PHP7 From: brian@moonspot.net (Brian Moon) On 7/14/15 16:04 , Sammy Kaye Powers wrote: > Hello lovely PHP nerds, > > There are two open PR's for PHP7 to modify the behavior of the CSPRNG's: > > https://github.com/php/php-src/pull/1397 (main discussion) > https://github.com/php/php-src/pull/1398 > > Currently the random_*() functions will issue a warning and return false if > a good source of random cannot be found. This is a potential security hole > in the event the RNG fails and returns false which gets evaluated as 0 in a > cryptographic context. On the surface, this sounds like a good thing. Although, I question that if a user is not checking $result === false, then will they end up just wrapping this in an empty try/catch so their code does not fail? There is a mechanism to detect the error now. I question why the cryptographic functions would not force an integer to be passed. Those should not accept a boolean and evaluate it as false. I am not sure what functions you are talking about though. Maybe 3rd party user land code? Accepting a boolean in those cases is a bug in that code IMO. -- Brian. -------- http://brian.moonspot.net/