Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99896 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41572 invoked from network); 18 Jul 2017 13:46:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jul 2017 13:46:07 -0000 Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.175 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 209.85.128.175 mail-wr0-f175.google.com Received: from [209.85.128.175] ([209.85.128.175:36032] helo=mail-wr0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5A/87-02884-A111E695 for ; Tue, 18 Jul 2017 09:46:03 -0400 Received: by mail-wr0-f175.google.com with SMTP id y43so30173687wrd.3 for ; Tue, 18 Jul 2017 06:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=A8dpni8GvSHfrTroRS/JRujCu0U2pTWTvlr5T4JyHrY=; b=R+yE5xDbZBdhhqaP99fRBtnC8VV7vzxyiRU5nEzixs+rHJTHHhO6qtyUmNMUR+NxrW zgcZrYwPGkS8f3YKbV+YRmyxLkBnfH3ObRMIeVTHQ0kkHEi8SC0ktulFjtQ6zUoSyiVF WK5+Ppc7gpEQWblTBCsV5deEDkbz+SASBEfB9I27n0K4yUyxTq08+0qM+mk28w+kx12C PzVObp9y33EVYnvfwoqYff0OcsjowgKRSHlSWgFcqVc6jEG2m5JcPeTsmePHDu8y5HiH RFuipxXUOp4rJlnD4Fhn5J8y3e4CBxUlr6xqRYvH3nrLEb9Pnbi74iaRApTTQT4WNfPh jBPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=A8dpni8GvSHfrTroRS/JRujCu0U2pTWTvlr5T4JyHrY=; b=CMyt4Vxv0mCmrSLtgcaOS9gxVR+3I2W23Ro4I3R6QeDDrfiJLg499hfXgz+GhU1bpj ewNYcGFAg4crUsUSf9FM+rNf1GFAS1HxrI71hBanFgv69H73RjXTe9J5rfN3vT+y29TP 864nDvqEVA4B2JS63ktPxTf1s2a0whrVH3o/X166VLNRVl6MSJTQvxKuY9QUhv1qsmLe 6ysmyY7rObguueo9EcryloYX1Nsuf+Lnp3uw3g2bW3yrY+Fc/2lvOinhc33NmBPye/Vr 27RIFj7zbX2ErdxlO0sSmUX2F2xUMNqM6jDdfYxL/TZfVtTMP9VY177msHzQHVUedAJB FZsA== X-Gm-Message-State: AIVw110kA19PaXiAUtcdg0gch7c668+dqN3dMsrPC9Qts+m5ek+arAWg yZrutZSLMJYviKQyUIYZSXpC9irkt92bD50= X-Received: by 10.28.9.205 with SMTP id 196mr1873211wmj.126.1500385559514; Tue, 18 Jul 2017 06:45:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.135.186 with HTTP; Tue, 18 Jul 2017 06:45:39 -0700 (PDT) In-Reply-To: <14052ebf-efea-cb43-39e0-bdc30e493ff3@genkgo.nl> References: <14052ebf-efea-cb43-39e0-bdc30e493ff3@genkgo.nl> Date: Tue, 18 Jul 2017 15:45:39 +0200 Message-ID: To: "Frederik Bosch | Genkgo" Cc: PHP Internals List Content-Type: multipart/alternative; boundary="001a11442fce4d14c6055497bce9" Subject: Re: [PHP-DEV] [RFC] samesite cookie implementation From: ocramius@gmail.com (Marco Pivetta) --001a11442fce4d14c6055497bce9 Content-Type: text/plain; charset="UTF-8" Hey Andrey, On Mon, Jul 17, 2017 at 11:11 PM, Frederik Bosch | Genkgo wrote: > LS, > > Today I finished writing the RFC for implementing same site cookies in > PHP, https://wiki.php.net/rfc/same-site-cookie. I am happy to receive > your remarks on the proposal, and improve when necessary. > > For those (only) interested in code, have a look at PR # 2613: > https://github.com/php/php-src/pull/2613. > > For the record, I am just a messenger in this regard. Someone uploaded a > patch for this feature in bug #72230: https://bugs.php.net/bug.php?i > d=72230. I just took the opportunity to create a PR and the corresponding > RFC. Credits for the code go to xistence at 0x90 dot nl. > > Hopefully, the samesite cookie flag will become a feature of the PHP > language through this RFC! > The current `setcookie` method has 7 parameters, of which 6 are optional. This is already a mess, as any default value change introduced for either forward-compliance or security issue compliance would result in a BC break. This RFC suggests adding even more parameters (URGH), and increasing the issue impact. I had already expressed this issue in https://wiki.php.net/rfc/openssl_aead, which made the `openssl_encrypt` endpoint a mess to deal with: an n-dimensional space of optional parameters and possible method behavior combinations :-P Imagine all the picturesque ways that people could come up with to do crypto the wrong way! Fascinating! Creating a cookie string in userland is trivial, and the `setcookie` functionality should just be left alone and maybe deprecated, IMO. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --001a11442fce4d14c6055497bce9--