Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91887 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83532 invoked from network); 24 Mar 2016 10:19:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Mar 2016 10:19:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.65 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.213.65 mail-vk0-f65.google.com Received: from [209.85.213.65] ([209.85.213.65:34610] helo=mail-vk0-f65.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 78/85-36618-23FB3F65 for ; Thu, 24 Mar 2016 05:19:30 -0500 Received: by mail-vk0-f65.google.com with SMTP id e6so4540209vkh.1 for ; Thu, 24 Mar 2016 03:19:30 -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; bh=ty2fPT+uB/uXtEE/EA/zbgm1Qyc53VGHDt0s7EcWgZo=; b=QZHP/EvaG2TtHxBvJrSPmiv0FMmNapiunLP4KfJP6V8V7t2Dy4vHCaeLHrn1Ga+JmK hcjmVCnvBOctmx+dDC6fboYT7liOWdTlU2Ia2ILp0Z6GzfDbmGiyCZNqAIa0OKdvGrSf mWJCAxPSuC03aTZSVX1dge70W1OncqiICOMr4kLoCkQA6N9SvoPqZj8WPNlAcqE3QnJY HHK24AoHE2w9zuLLJZCDqAJSkfE1Xtj2pWSohO9JEhSx4fFzKYQvR0FKyyEjMzDjxlq1 21KoggmVgDW7AvE0CstCvIWt9dp30XzlKUB3mTkFl0p/GSIEOcD+YgVVMo1FLEBxTy4l i9Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ty2fPT+uB/uXtEE/EA/zbgm1Qyc53VGHDt0s7EcWgZo=; b=iSrw3pRIZL5JG3u20JsojgucG69KbDKizry0mh1Q5JpSbpSvhki+8T6NwwwXP33Fh9 HnVyoFM1hsU7QUxNdDNj5w+mywGCGW/rbWUHj3q15bBs5q4Aju8NeNtbQR+7K5c93/2l qf/MsqyKZ/TPyKcIBbJUz433Jg+cDjL36X4ffslcM0U5auLBnJjU2yNM1EId/JlR0DnB 8oqMEFfVsuiBh0eVSYMM0/jpTus0c3RrgzT1VPl4p6GOXI/SoBIvuLZXIE/Mbp+cJeX/ FXzJBFSVnGIsq3bm68httu4qspcRLkQTA/wHiV8Ls2hKMIXv5shnbRLtDdzQtJksBaJH SqWw== X-Gm-Message-State: AD7BkJK4Kmfw+kT9GPfFJwC2vedI0px9UxI9E6qtEGiPuQas70a5NLpP9THUisdkvbPQLGNi7PGBsLltb79Czg== X-Received: by 10.159.35.72 with SMTP id 66mr3434697uae.119.1458814767954; Thu, 24 Mar 2016 03:19:27 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.159.40.98 with HTTP; Thu, 24 Mar 2016 03:18:48 -0700 (PDT) In-Reply-To: References: Date: Thu, 24 Mar 2016 19:18:48 +0900 X-Google-Sender-Auth: Vh2cVp8hbN8SGZO-heHK83aaH7k Message-ID: To: Joe Watkins Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: [RFC][Discussion] Precise session data management From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Joe, On Thu, Mar 24, 2016 at 4:22 PM, Joe Watkins wrote: > > First, thanks for all the effort ... You already know that, a refusal to > merge a patch doesn't mean you wasted your time, it should serve to refocus > your research. > > So, I thought I'd say some stuff, to aid with that ... > > The first thing I would do is break down the problem into smaller, much > smaller, RFC's: We know there are many inconsistencies in the language, we > could write a huge long list, and do a bumper RFC to solve them all at once. > But would that be a good idea !? Splitting patch is not a problem. Some changes are interrelated, but many could be applied individually. > > As already mentioned it's much easier to consider each problem on it's > own, and the solution for that problem on it's own, than it is to consider > what we are going to do about this huge mess. Try to remember that while you > have had your head buried in this stuff for a long time, the rest of us > likely haven't. > > I don't really like to talk about security, it's not a thing I feel > qualified to talk about ... but, there is inconsistency in saying "we should > have a secure by default session module", and then introducing ini settings > that can vary the effectiveness of the solution, based on guesses about the > length, and speed at which elevators travel ... > > Having another setting which seems to be 18 times longer than the > recommended value for "low security applications" is also extremely odd to > me ... > > That you can't find sensible defaults for these values, says to me that > these problems don't have solutions in our domain; Application security is a > problem that can only be solved by the programmer using PHP. > > We should provide the tools, we should not lie about the validity of a > session because of faults in our design, every layer we provide should be > consistent, but the problem still belongs to the programmer using PHP. I agree. It's like using TCP or UDP. I don't mind much either way, but I prefer TCP like behavior for session manager because session manager jobs is keeping reliable session. Current PHP session is UDP, users are responsible use it correctly. If we keep UDP way, I think we should remove session_regenerate_id(TURE) at least. i.e. Remove deletion option from session_regenerate_id() because it doesn't work and bad way to manage session ID. I'll write PHP code for those who are care about session reliability and security. Following code is minimum code. I wrote this code directly, so take this as pseudo code. I might be missing something as I do not verify this code, but it should be good enough to know what users must do. Using UDP like TCP is not too difficult, but not too simple also. Session management is the same. This is not equal to what the proposed patch does. This is the least requirement for reliable session management. It's much less efficient in user script. It's cost of user space implementation. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net