On Mon, Sep 23, 2019 at 10:17 PM Larry Garfield <la...@garfieldtech.com> wrote:
> I cannot speak for OpenSSL, but random_bytes() and random_int() were changed > very late in the 7.0 cycle to throw exceptions so that they "fail closed". > Otherwise if you expect a random value back but get a constant value (false > or empty string), if you don't remember to check it yourself every time then > you now have a security hole because you're using a constant seed for > random-dependent behavior. > > That was a good change, and it should be kept that way, IMO. Fully agree. This is actually pretty the only way to handle errors with these functions. Anything else creates a risk that we could have easily prevented. Best, -- Pierre @pierrejoye | http://www.libgd.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php