Re: Re: [RFC][VOTE] Session ID without hashing
| From: | Yasuo Ohgaki | Date: | Wed, 06 Jul 2016 21:30:56 +0000 |
| Subject: | Re: Re: [RFC][VOTE] Session ID without hashing | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-94404@lists.php.net to get a copy of this message | ||
Hi Christoph,
On Wed, Jul 6, 2016 at 9:10 PM, Christoph Becker <cmbecker69@gmx.de> wrote:
>
> Yes, I am aware that the patch uses php_random_bytes(), but what happens
> when it fails, in which case php_session_create_id() returns null[1]?
> Would it be impossible to use a session in this case?
php_session_create_id() may return NULL. It's an usual error. Session
module supports session ID creation save handler which may return
anything valid for the type.
Session module tries to call php_session_create_id() several
places/times. If it could not get valid one, it raises
E_RECOVERABLE_ERROR or E_ERROR eventually.
Although it's not enabled yet, PHP_FUNCTION(session_create_id) returns
FALSE it fails.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net