Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:90933 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5949 invoked from network); 26 Jan 2016 09:29:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jan 2016 09:29:49 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.169 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.160.169 mail-yk0-f169.google.com Received: from [209.85.160.169] ([209.85.160.169:36246] helo=mail-yk0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/73-10534-B8C37A65 for ; Tue, 26 Jan 2016 04:29:48 -0500 Received: by mail-yk0-f169.google.com with SMTP id v14so192582682ykd.3 for ; Tue, 26 Jan 2016 01:29:47 -0800 (PST) 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=8DmTD0bYsq6DleSmmT9JIF6vp59n6+qATM6tXsVSfIA=; b=iqNJeJP5Zp1aEgJVuC69BcjrMnyORbnwKBGULOrsvPj7XakBaiQ0rsblgdng4VqkUu 0e86sMnbvXKiSZlnaqrsJ1EHSqZDJWm7fHs98OjYTuiddcIT1+0s8HQ6Db6rxBaHrYtj joODdIuYI0n2BrRzZ3C1YO/5qzXDwhtJh3pYVIUknp5TOqqfk7Q4kBH7SlS1KxEom1xN nIq2MTHj2l6YB4qbNKcYofeKCk9Xmvw9CUhJ63OSk8Wg5DBV0SpgspShTtpLduFTy4WX orHCh6PRLdXQABwP7W9pBUHkAOQZ9tmMFL4b/H2xlXNzqyZ0+MhcKYkzMQvL6qR2ICIY jwHQ== 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:content-type; bh=8DmTD0bYsq6DleSmmT9JIF6vp59n6+qATM6tXsVSfIA=; b=O6HfQ4tnwWxyVht3wsl4CpFyJM45eh7DF5TmAYQR/Dvit8r3iq8esfEdPjjdBjLX4w m+mN727YXE5dt6faYXBF6PThkCyDm6nCWhTPyVdbXTR4FvtsaQEE5ETXm44OSClwSVls bbNMRZqVMrkK8nPV0tqiKP3b3t7zLAkWwlnzotrtnxBAPCUOGz+QjDB70Mawa5127x8s pxi6eBJSbkJkTUlMdngH9DtFg5vIWCAvVxostFjlqGcT0YXu0LUyC21M5/JxZWw/tyvr /qEqDt86WAlnxNhM52RLqb0loPUdjNplE2WV2PpvSXpsQTlKuD+a+TtIhnrNCM2vg7IF XjYg== X-Gm-Message-State: AG10YOQxbW7u19oYqHGy15oYZJoGoszfJ9WHTvx6mjj9qLTiWDXxwJOx2FkCiIWIjlQqeOoryyTvEuronfHV5g== X-Received: by 10.129.128.193 with SMTP id q184mr3961839ywf.220.1453800582277; Tue, 26 Jan 2016 01:29:42 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.129.88.139 with HTTP; Tue, 26 Jan 2016 01:29:02 -0800 (PST) In-Reply-To: <56A72B36.5060307@gmail.com> References: <56A72B36.5060307@gmail.com> Date: Tue, 26 Jan 2016 18:29:02 +0900 X-Google-Sender-Auth: jZvTViEB7yaDuwFoH6Ib_aUE_a8 Message-ID: To: Stanislav Malyshev Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: [RFC Discussion] Precise Session Management From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Stas, On Tue, Jan 26, 2016 at 5:15 PM, Stanislav Malyshev wrote: >> Since this RFC is about preciseness of session management, I would like to >> change session_id() validates against default allowed chars as follows. >> (As well as enabling already written session_create_id() function) >> This patch is against the PR. > > I would strongly advise not to add more things into this RFC (see my > other email). If you want to change which chars are allowed in session > ID, fine, but let's discuss it in separate topic. Fine with me. > However, I would proceed *very* carefully here, as there are apps that > produce their own session IDs, and breaking them does not help anybody. Sounds good. As I wrote in previous mail this is going to be largest BC impact of changes I proposed. > About, since session_id() is a user function, what do we gain by > limiting what it does? Prefix is a part of session ID and it should have the same requirement as session ID for security reasons. > For session_create_id(), don't we already have > SessionHandler::create_sid()? There is SessionHandler::create_sid(), but there isn't a function that creates secure session ID. We may do sha1(random_bytes(32)), but it's better to have function that uses specified hash/data by session.hash_function/hash_bits_per_characters. So "sha1(random_bytes(32))" and "session_create_id()" is not equal, for example. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net