Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:90936 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15047 invoked from network); 26 Jan 2016 11:35:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jan 2016 11:35:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.47 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 74.125.82.47 mail-wm0-f47.google.com Received: from [74.125.82.47] ([74.125.82.47:37627] helo=mail-wm0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 16/B4-10534-8E957A65 for ; Tue, 26 Jan 2016 06:35:05 -0500 Received: by mail-wm0-f47.google.com with SMTP id n5so125277684wmn.0 for ; Tue, 26 Jan 2016 03:35:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=kzOukDwOrw5LpsxSndRuHnIso7Vh6s0JJafOVSnDYkc=; b=z/ObybGZpImr0u9OehqZQp5uveN0Ij4luBpLV2z3P/4v4SF8EcksFgLAQ8I5IIA0mY 6dty0KCONM/9KZ9nwXcXgH8/FFDx8NE4ux9DWyTCzVdYkjVkOiZFFtLAQbFIVWpZfKV6 MjM+evLz4DqnKsdwuyT6UcourZWoMvjlk6qEM0SySYL4FZowxqWpFD04z1PzxuKMcXBj BUW3Deumz59PiaKf0M4kmzZsrHFqfbPSsA7Z5lNbLDi8YmPWPLgqHTwHiQsEFGSXH50Z q+QSk2C3buqx8NPxmS+LRcTNZVpTLXg/ww5eoggyNeoaozH68s+I0s0uOBs7t5XLzEK2 eK6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=kzOukDwOrw5LpsxSndRuHnIso7Vh6s0JJafOVSnDYkc=; b=EDFyY2lnZnMkoClKensvGvyBCmeMtmyiejJ1Awtu/qw1RG9HdOm6HONZrmD7vjEzBg uBkeGrsNQMfZBicA7LFxXTG83AtmsUo06KUscwIWQ1s+KMiPAoIgovRO7hs9zGbcqP+N ULQU5FsOKmCuYCO5dXgyxQYSu7bZ4Zh/tTSe9VIe96HU/HT2Np71ASe5/Ggst2HsiVwj 7LhEuxgJVxPBFle/1FWAt/VUDfj+ZQPr37TUEbiVjN/GFLENK0osUU1PtDk3Evb0uFQ6 602VPzjpgLINmC/SYLgbFGT0HC2w0TlCIOk920omUWLTZ+2UMD5P2/ByBcyDCYLqdJ74 JrIQ== X-Gm-Message-State: AG10YOS6+jEG/YgPj+KhUD5D3/4XwzDY5UOk0MqgmSzT92XC7EhwUmWSNgquaFJERuE8Baa3SIMdZdmXggFYfw== MIME-Version: 1.0 X-Received: by 10.194.116.197 with SMTP id jy5mr17501604wjb.43.1453808100717; Tue, 26 Jan 2016 03:35:00 -0800 (PST) Received: by 10.28.148.5 with HTTP; Tue, 26 Jan 2016 03:35:00 -0800 (PST) Received: by 10.28.148.5 with HTTP; Tue, 26 Jan 2016 03:35:00 -0800 (PST) In-Reply-To: References: <03a501d15439$fcbf9ca0$f63ed5e0$@php.net> <56A1054A.5080102@fedoraproject.org> Date: Tue, 26 Jan 2016 18:35:00 +0700 Message-ID: To: Yasuo Ohgaki Cc: PHP internals , Ferenc Kovacs , julien pauli , Remi Collet Content-Type: multipart/alternative; boundary=001a1130cf266a4352052a3b13a1 Subject: Re: [PHP-DEV] PHP 7.0.3 RC1 is available for testing - **** BC break *** From: pierre.php@gmail.com (Pierre Joye) --001a1130cf266a4352052a3b13a1 Content-Type: text/plain; charset=UTF-8 On Jan 26, 2016 4:02 AM, "Yasuo Ohgaki" wrote: > > Hi Remi and all, > > On Fri, Jan 22, 2016 at 1:20 AM, Remi Collet wrote: > > Fedora detected a BC break in 5.6.18RC1 and 7.0.3RC1 related to > > session management. > > > > This update breaks: > > > > Horde_SessionHandler (2.2.6) and symfony (2.7.9) > > Thank you for notifying issue. > Remi provided reproduceble phpt for this test failure and > found out the cause of test failure. I really appreciate your help! > > Anyway, the cause was bug fix for "session_start() returns > TRUE even when failures". Details for this specific case is following. > > Newer session cache limiter has php_session_abort() > > static int php_session_cache_limiter(TSRMLS_D) /* {{{ */ > { > php_session_cache_limiter_t *lim; > > if (PS(cache_limiter)[0] == '\0') return 0; > if (PS(session_status) != php_session_active) return -1; > > if (SG(headers_sent)) { > const char *output_start_filename = > php_output_get_start_filename(TSRMLS_C); > int output_start_lineno = php_output_get_start_lineno(TSRMLS_C); > > php_session_abort(TSRMLS_C); <<<<<<<<<< This is the cause > if (output_start_filename) { > php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot send > session cache limiter - headers already sent (output started at > %s:%d)", output_start_filename, output_start_lineno); > } else { > php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot send > session cache limiter - headers already sent"); > } > return -2; > } > > This is added because when session cannot be started, then it should fail. > This fix is related to https://bugs.php.net/bug.php?id=71243 > The php_session_abort() is not directly related to this bug, but this (and > other fixes) is added because session_start() returns TRUE even when it fails/ > should fail. > > Note: PHP 5.6's session_start() return value fix is not perfect to keep > save handler compatibility which is a big one. PHP7 should return FALSE > for session_start() failures always by the fix. > > Fixing the broken test should be just removing the php_session_abort() from > php_session_cache_limiter(). Fixing broken tests most likely mean BC will remain which is not so good. I understand the overall goal to improve session security but this is an area that has behaved this way for years. I am totally convinced that such big changes should have (or should) in stable branches, be 7.0 or 5.6. Especially because testing these changes take time. Cheers, Pierre --001a1130cf266a4352052a3b13a1--