Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94404 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12179 invoked from network); 6 Jul 2016 21:31:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jul 2016 21:31:49 -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:59149] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/72-18622-1C87D775 for ; Wed, 06 Jul 2016 17:31:47 -0400 Received: (qmail 41935 invoked by uid 89); 6 Jul 2016 21:31:42 -0000 Received: from unknown (HELO mail-qt0-f171.google.com) (yohgaki@ohgaki.net@209.85.216.171) by 0 with ESMTPA; 6 Jul 2016 21:31:42 -0000 Received: by mail-qt0-f171.google.com with SMTP id m2so123546077qtd.1 for ; Wed, 06 Jul 2016 14:31:41 -0700 (PDT) X-Gm-Message-State: ALyK8tKnilrbNVS06cM0TTzAGEa3tUalEDOWNIgiftoDw7KMO7cM9115/rIeV8qcbTmp68jDNqnTSgvz0hIztA== X-Received: by 10.200.49.50 with SMTP id g47mr39173595qtb.76.1467840695900; Wed, 06 Jul 2016 14:31:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.17.33 with HTTP; Wed, 6 Jul 2016 14:30:56 -0700 (PDT) In-Reply-To: <9e874892-d682-1c0d-77ad-21d5b44ce25b@gmx.de> References: <9e874892-d682-1c0d-77ad-21d5b44ce25b@gmx.de> Date: Thu, 7 Jul 2016 06:30:56 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Christoph Becker Cc: Leigh , 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 Christoph, On Wed, Jul 6, 2016 at 9:10 PM, Christoph Becker 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