Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75044 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19483 invoked from network); 23 Jun 2014 08:07:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jun 2014 08:07:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.170 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.216.170 mail-qc0-f170.google.com Received: from [209.85.216.170] ([209.85.216.170:37065] helo=mail-qc0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/D0-14743-450E7A35 for ; Mon, 23 Jun 2014 04:07:48 -0400 Received: by mail-qc0-f170.google.com with SMTP id l6so5801714qcy.15 for ; Mon, 23 Jun 2014 01:07:45 -0700 (PDT) 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=2d/OkU20uV76fYUpocSN0oeYnOjPlmHE/jZBl5YtWfU=; b=akNETjxja8AdSfNYc2LE8EGioP3Vk4g8lEH4KMRVtBfzSRAHKSuXDUQWVJFye8Is87 Lak2MBqjwcmh7t/53CjtHEpelcfCvc+nJONl7tcE3Zrp/jAL2TD/kqEJ88xoSQchcK+o aB7pPRVBArtnFDnkAPuxHeuf+aCUGC7Tc/9Ufrs98z6P6zhazRZMr9rAMuhlqMS4ahcA pdcA3GemiEHMOO7KRCF2yeNihauEvHGASNJRDiuQ/kLIA442va9kWNRY3/W/THqSWE2b qVrTxPUGp1y8MzXS2NLEr9XbDo0xyXk97nKof+MsMkA/gw3VH1MDGmeZ8CeENaI/Oa8w Ygxg== MIME-Version: 1.0 X-Received: by 10.140.27.23 with SMTP id 23mr27906105qgw.94.1403510865274; Mon, 23 Jun 2014 01:07:45 -0700 (PDT) Received: by 10.140.17.77 with HTTP; Mon, 23 Jun 2014 01:07:45 -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:07:45 +0200 Message-ID: To: Julien Pauli Cc: Stas Malyshev , Sebastian Bergmann , Remi Collet , PHP Internals Content-Type: multipart/alternative; boundary=001a11c14a7c902d6c04fc7c5620 Subject: Re: Bug 67072 resolution for 5.4/5.5 From: tyra3l@gmail.com (Ferenc Kovacs) --001a11c14a7c902d6c04fc7c5620 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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, b= ut > >> 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 coupl= e > > 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. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --001a11c14a7c902d6c04fc7c5620--