Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102948 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48996 invoked from network); 22 Jul 2018 08:43:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jul 2018 08:43:04 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.46 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.214.46 mail-it0-f46.google.com Received: from [209.85.214.46] ([209.85.214.46:33335] helo=mail-it0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/5B-47674-793445B5 for ; Sun, 22 Jul 2018 04:43:03 -0400 Received: by mail-it0-f46.google.com with SMTP id d16-v6so112485itj.0 for ; Sun, 22 Jul 2018 01:43:03 -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=FfeMIEgRTyXc2EkOXDP/Trm7nrZqHOGfr+EPKfDNfJ8=; b=qcufSBZnhrfsaXcCa8NrYdcWu603DzHkR7HqScO8ScjJ59GwJoHgY9mLcOVaJ/FOxX LL79zi09TjNWI96ejjypfAkm59PzcejG86ZcYHNwHg4uxxOiYx16BEyKiUpB4vFmCIk3 6dJaNoXJaJWJGfcPZuvJgTSh4fga+8xPoSiZeraWIB/tJceARLRDf3LMe1/tCrqvYiIY Dc6JftlnfpCvlP539ynwo8WpJvH0RWgkOkN7lS7242th1aUr0oGP0WM6Jm/rYyoEU/pN Qs7+Up79hpGl+tmUSretG7ooCQidSm6DKY2o+NHam2nsZ1j1XX9aS3a4Sx1RCRrIU2of 7cbw== 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=FfeMIEgRTyXc2EkOXDP/Trm7nrZqHOGfr+EPKfDNfJ8=; b=n9KV0bS/XKg5x2fEL0jLhbbM9d7MJ0lX/CYhj37HVFQKLzanT4ZV/AUW56p/AjugBz ImghP56ftYtQMgYK5HSJcHw+tapxMpjTLc8RmL32DIjzjd2TgQNQsd0kbQCU8z9xj+wm KKOfv4sI4XUASkMEiCZH6ziyzg4UhnZf5u+pJcEr9JLzptpxHy8lX4/AH8KUEphde50c DGArSSqrjSCWi+VBuYeTFRktGF0N/0uUu0Od+qrdDjs9YavAM1LOhCyv59JvaaoPdhF+ gQ2TiFQzY/15I0Y5CgGaf7boRwyyipGGgmuLig2DiiNZzd4EZ5fB4bmTz3zdovyvImnH hS8g== X-Gm-Message-State: AOUpUlEhwjPMlrtlcysxusHCzBOXFCEL5GeYIdaV9PjvkuUMtz16vqWo AAVbIdMcMiUXYCXr68f5qnQUr2WYSrK+41kYE4g= X-Google-Smtp-Source: AAOMgpdSbtHT3U+CBykZjZSqq6aYoCpF5N7Bap4tM3IVtwsFGP/DDHmBB8VVUXZHIOBKS/PMluvt+49yv9DtHNSJay4= X-Received: by 2002:a02:503:: with SMTP id e3-v6mr7891460jad.29.1532248980217; Sun, 22 Jul 2018 01:43:00 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:148a:0:0:0:0:0 with HTTP; Sun, 22 Jul 2018 01:42:59 -0700 (PDT) In-Reply-To: References: <1abd260d-ebc4-a062-3381-72485946e8bc@gmail.com> Date: Sun, 22 Jul 2018 10:42:59 +0200 Message-ID: To: =?UTF-8?Q?Pedro_Magalh=C3=A3es?= Cc: Andrey Andreev , f.bosch@genkgo.nl, Stanislav Malyshev , PHP internals Content-Type: multipart/alternative; boundary="0000000000002c652f0571928461" Subject: Re: [PHP-DEV] [VOTE] Same Site Cookie RFC From: nikita.ppv@gmail.com (Nikita Popov) --0000000000002c652f0571928461 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Jul 22, 2018 at 1:21 AM, Pedro Magalh=C3=A3es wro= te: > On Sat, Jul 21, 2018 at 11:26 PM Andrey Andreev wrote: > > > Yes. > > > > All other "options" are actual *cookie attribute* names, as defined by > > the various IETF RFCs, while "lifetime" is just a convenient name used > > by PHP. It doesn't correspond to a particular attribute, but instead > > the values for the Expires and Max-Age attributes are derived from it. > > I believe during discussion I insisted that the parameter be called > > "attributes", for this very reason. > > > > Hi, > > While I do understand your reasoning, I find it extremely unfriendly to t= he > user of the function to ask for one parameter separate from all the other= s > for that reason alone. > Also, keep in mind that all this function does is set the > `session.cookie_*` ini entries. So all parameters are treated equally. > To add to this, session_get_cookie_params() already returns all parameters including "lifetime" in one array. It would be very weird if there was an asymmetry between session_get_cookie_params() and session_set_cookie_params(). Furthermore, the way I have seen session_set_cookie_params() used, it has pretty much always been in conjunction with a prior session_get_cookie_params() call to get the current values and then only one (or some) of them being adjusted. It makes more sense to write $params =3D session_get_cookie_params(); // Change $params here session_set_cookie_params($params); than having to treat just the $params["lifetime"] case specially. Nikita > On another note, I also wanted that pretty much any key/value pair to > > be accepted instead of raising an error, for forward compatibility. > > > > I really believe that the user spotting errors like `['expries' =3D> time= () + > 3600]` faster is more valuable than FC. > > Regards, > Pedro > --0000000000002c652f0571928461--