Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75046 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26310 invoked from network); 23 Jun 2014 08:56:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jun 2014 08:56:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.181 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.220.181 mail-vc0-f181.google.com Received: from [209.85.220.181] ([209.85.220.181:35795] helo=mail-vc0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 03/22-14743-9BBE7A35 for ; Mon, 23 Jun 2014 04:56:25 -0400 Received: by mail-vc0-f181.google.com with SMTP id il7so5652103vcb.12 for ; Mon, 23 Jun 2014 01:56:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=w2jM15YL/pyekOUt0dbFqXt9/ZmDAYK8bBszE31bCzI=; b=a3cJuxZR6Q8mQDQVORuxAEqohy64e6ryoPk/89EvQYb0t+iCKw6wPl2ajvX4lyBmak o8eoG5yibtx/mkqs74xyIOG8MQBlN5zr31cT8jnD4RIi2TEgovPvCmMyh+NEOI/YcTo/ BlWf5XOleD2rBSM0QruGue4+jcUE3lRVcGUID/Zy6agbIqzLAoXM/xQXIES+ltEpu/Sz 3kOKUltCzoDDBleOjyLFyXDC6Kxsc7j39AuzyuXca580NDQC8+BGpmJrZEKQRhtvp2Jr 94ElPV9JBhOwnPJSK1RDvQnrSg9iKgnvxZh7uffRPp3IWZdDH2NzrHxN+ubPOGIhVVs7 3icA== X-Received: by 10.52.120.109 with SMTP id lb13mr22092vdb.53.1403513782625; Mon, 23 Jun 2014 01:56:22 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.220.81.68 with HTTP; Mon, 23 Jun 2014 01:55:42 -0700 (PDT) In-Reply-To: References: <53A1C722.9060501@fedoraproject.org> <53A21137.6010705@sugarcrm.com> <53A2A9BD.1070603@sugarcrm.com> <53A3874E.20704@sugarcrm.com> <53A65578.6000701@sugarcrm.com> <53A772D0.3010404@sugarcrm.com> Date: Mon, 23 Jun 2014 10:55:42 +0200 X-Google-Sender-Auth: 60MBozVKjGmNa7sLGcd41lFZ_Jo Message-ID: To: Ferenc Kovacs Cc: Stas Malyshev , Sebastian Bergmann , Remi Collet , PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: Bug 67072 resolution for 5.4/5.5 From: jpauli@php.net (Julien Pauli) On Mon, Jun 23, 2014 at 10:07 AM, Ferenc Kovacs wrote: > > > > On Mon, Jun 23, 2014 at 9:54 AM, Julien Pauli wrote: >> >> On Mon, Jun 23, 2014 at 2:20 AM, Stas Malyshev >> wrote: >> > Hi! >> > >> >> for the issue to materialize you need to feed hand-crafted input to >> >> unserialize, >> > >> > True. >> > >> >> anybody doing that with user controlled data already asking >> >> for problems, >> > >> > True in theory, in practice this is widely and commonly done. >> > >> >> I prefer this over what we have in 5.4/5.5 and given how few classes >> >> does 1, actually mean, I think it would be an acceptable compromise, >> >> but >> >> let's hear what others think. >> > >> > Cool, waiting for others to chime in. >> > >> >> ps: I've seen that you created a pull request with the patch, if >> >> somebody don't wanna copypaste the patch from the mail, here it is: >> >> https://github.com/php/php-src/pull/701 >> > >> > Yes, thanks for quoting it, it seems to be green on Travis and phpunit >> > also seems to work fine with it. I also added a unit tests with a couple >> > of cases to see how it's supposed to work. >> > >> > -- >> > Stanislav Malyshev, Software Architect >> > SugarCRM: http://www.sugarcrm.com/ >> > (408)454-6900 ext. 227 >> >> >> Hello, >> >> I find the compromise nice. >> The goal is to have something barely working in most use cases for 5.4 >> and 5.5, and prepare something nicer and stronger for 5.6. >> >> So, the proposed patch ( Stas' ) is nice for this, as comon tools still >> work. >> >> I'm also ok for the 5.6 statements : >> - Disalow O: for classes with custom serializer >> - Unlock newInstanceArgWithoutConstructor() for internal classes >> >> Note that unlocking newInstanceArgWithoutConstructor() for internal >> classes may require lot of work. >> Remi already tried to patch some extensions for them to work AFAIR. > > > and maybe not even possible to fix all those cases, yet we already have the > same problem with: > MyClass extends InternalClassDependingOnConstructor { > public function __construct(){ > //not calling parent::__construct > } > } > > so that shouldn't be a blocker for enabling internal classes for > newInstanceWithoutConstructor > but I would discuss this separately/later, as the 5.4/5.5 decision/fix is a > bit more urgent. Yes, for 5.4 and 5.5 , Stas' patch looks right to me. Julien