Re: Re: [RFC][VOTE] Session ID without hashing

From: Date: Fri, 08 Jul 2016 01:38:59 +0000
Subject: Re: Re: [RFC][VOTE] Session ID without hashing
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-94426@lists.php.net to get a copy of this message
Hi Leigh, On Thu, Jul 7, 2016 at 5:25 PM, Leigh <leight@gmail.com> wrote: > On 6 July 2016 at 22:30, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote: >> 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. > > If it fails due to a lack of random, it throws a fatal. Tested your PR > and forced the fd of /dev/urandom to -1 in ext/standard/random.c > > $ sapi/cli/php -n -r 'session_start();' > > Next Exception: Cannot open source device in Command line code:1 > Stack trace: > #0 Command line code(1): session_start() > #1 {main} > thrown in Command line code on line 1 > > Fatal error: session_start(): Failed to create session ID: files > (path: ) in Command line code on line 1 session_start() will result in E_ERROR or E_RECOVERABLE_ERROR currently. I've tried to change E_ERROR to E_RECOVERABLE_ERROR before, but it was reverted because someone objected. session_create_id() which is disabled by #define returns FALSE now. I need RFC vote to enable session_create_id(). It was added as FR implementation, but it is disabled for the same reason above. There are many places need cleanup. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net

« previous php.internals (#94426) next »