Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:90955 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86601 invoked from network); 27 Jan 2016 01:22:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jan 2016 01:22:54 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.50 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.50 mail-pa0-f50.google.com Received: from [209.85.220.50] ([209.85.220.50:32797] helo=mail-pa0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/D4-56702-DEB18A65 for ; Tue, 26 Jan 2016 20:22:53 -0500 Received: by mail-pa0-f50.google.com with SMTP id cy9so106795705pac.0 for ; Tue, 26 Jan 2016 17:22:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=MlU9xUUv42VJHvBM+AQD35e82FWlOuBxM6xnwmyItYQ=; b=ycgLeoLKtG6QkW3ZjhPf7jTPqIv1Eh2GWlPU6ObVY0rzrOtb8rfdFyZoJ1hEiUSi6q 5TXgq6+vWMtNtmTIf9/39S80BTLsfevMJhBjXdNhfEriik91tKyMlBXs2yqdCtXZWA1Z O+IOfKYBTJjkjP5Kae7G05/SxNFD1lhj+tDFGjYIeIh7TKIyBCucDl56CjXMPWbjgnLw B5IBPr3noLoDiG0Ss5XRNAhJ8JAk2DKycu1uCrwcI+5veJocp5ZOHDs35e84OpXzez6P ckSnDKCnHKvZHmE9pvQ2VnwpSR1zwqaeS1DoXxaEHaLVrCzGMd/F1tOZMtw3fvTBmJU/ oqXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=MlU9xUUv42VJHvBM+AQD35e82FWlOuBxM6xnwmyItYQ=; b=A/dVdN26yurCP032ei8Jym2Ovez3sOSBozUZBEh5xtPl+iL0v6u/oZIKuDTYCFrWn6 5Mk0ATgjoH3VXa/6pOMSixzizLOUL7grOzOLIgLRIXATBWM/9xxKrV0ZuFc6kPj6p+Oo cCmHKcHrPngEcM4sAkPpSN/vE47t7jok7pOt/clFhi0EnCUeWhXvqaFZP7+AMKAtl/av 30p0GJrE2u1Swk3WPQUq91jYQfItUu8a8A0WwopM6t37/rnXJSqOchxws9vMMO9qaYyQ e0jkbDZAggsxY9Erb7rIbOJaDmpphasEr/Zn1+uYKLYQapwFitCHR4wchtypVKKSlfIn 6tNQ== X-Gm-Message-State: AG10YOQJ42HisMmeMbXSSZxKBCcDHplPbpWXhpKfBGz2hcJOiDo/ssyqrdZ0Qa8Pe8N8ag== X-Received: by 10.66.120.200 with SMTP id le8mr38511021pab.61.1453857770069; Tue, 26 Jan 2016 17:22:50 -0800 (PST) Received: from Stas-Air.local (76-220-46-95.lightspeed.sntcca.sbcglobal.net. [76.220.46.95]) by smtp.gmail.com with ESMTPSA id k74sm4485265pfb.30.2016.01.26.17.22.48 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Jan 2016 17:22:48 -0800 (PST) To: Yasuo Ohgaki References: <56A72B36.5060307@gmail.com> <56A80C47.1020001@gmail.com> Cc: "internals@lists.php.net" Message-ID: <56A81BE5.6030200@gmail.com> Date: Tue, 26 Jan 2016 17:22:45 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [RFC Discussion] Precise Session Management From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > Oops, sorry. Too many lines to reply, I misread session_id()/session_create_id() > > session_id() sets session ID. Invalid char that cannot be accepted should be > rejected. Otherwise, user will have lost sessions without errors. As far as I know, handlers already reject characters that are not OK with them. So what is missing there? > SessionHandler::create_sid() is for creating user own ID. Generating ID with > certain prefix. Not sure what you mean. The code here: https://github.com/php/php-src/blob/master/ext/session/mod_user_class.c#L175 is clearly generating an ID. Is this not secure enough? > Currently, there is no simple way to generate session ID with the form > of session module generates. i.e. hash_bits_per_characters=5/6. There > should be an API for it. Wait, so which ID the SessionHandler::create_sid() generates? Isn't that the same function? Which function you plan to use instead? -- Stas Malyshev smalyshev@gmail.com