Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94426 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12460 invoked from network); 8 Jul 2016 01:39:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jul 2016 01:39:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; 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:33273] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 56/8F-18622-6640F775 for ; Thu, 07 Jul 2016 21:39:52 -0400 Received: (qmail 122659 invoked by uid 89); 8 Jul 2016 01:39:46 -0000 Received: from unknown (HELO mail-qk0-f170.google.com) (yohgaki@ohgaki.net@209.85.220.170) by 0 with ESMTPA; 8 Jul 2016 01:39:46 -0000 Received: by mail-qk0-f170.google.com with SMTP id e3so30314155qkd.0 for ; Thu, 07 Jul 2016 18:39:46 -0700 (PDT) X-Gm-Message-State: ALyK8tLPgD06ODWRJNpzBZ+MxVgMDS+HNcHldNj9rkIp5WYewEPdqt9K+ascSK6nFJqS5IRoICH+aIae7f1HJw== X-Received: by 10.55.26.11 with SMTP id a11mr1517335qka.205.1467941979011; Thu, 07 Jul 2016 18:39:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.17.33 with HTTP; Thu, 7 Jul 2016 18:38:59 -0700 (PDT) In-Reply-To: References: <9e874892-d682-1c0d-77ad-21d5b44ce25b@gmx.de> Date: Fri, 8 Jul 2016 10:38:59 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Leigh Cc: Christoph Becker , Pierre Joye , Dan Ackroyd , PHP internals , Stanislav Malyshev Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: [RFC][VOTE] Session ID without hashing From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Leigh, On Thu, Jul 7, 2016 at 5:25 PM, Leigh wrote: > On 6 July 2016 at 22:30, Yasuo Ohgaki 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