Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72152 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82752 invoked from network); 3 Feb 2014 22:35:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2014 22:35:22 -0000 Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.160.178 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.160.178 mail-yk0-f178.google.com Received: from [209.85.160.178] ([209.85.160.178:55066] helo=mail-yk0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 13/BD-35654-7A910F25 for ; Mon, 03 Feb 2014 17:35:21 -0500 Received: by mail-yk0-f178.google.com with SMTP id 79so43107494ykr.9 for ; Mon, 03 Feb 2014 14:35:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Z6W4opPqgO5nStdogCEGLPTX8t/sPsTYljW8/SHwW7Q=; b=t9NfJM8lTU02gKfbgt3Y6+fImlqoh/RlbR0GvYpzMGKn6D6oybPOgoj/MokH6vhB/K rrfwFyiIfs7gQi22klemMmZJo/0ne4hMRDttumvzvx7yks2LzD8p+VrahHuvR51G0fW3 aNfB95FtSOQ681DGvg7A9e4KEoAskNaE0Ar0g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Z6W4opPqgO5nStdogCEGLPTX8t/sPsTYljW8/SHwW7Q=; b=VFs+60+LFDzm76mYozuAX8cPtp4J2KywiL5A/GEHqxUmxF2bHWRqJRX5CTDItRXmi5 cNG9qLBqFekmDkO/eeVRluEJ2ONukhfrdyOyUjVHcmjbcBNlddNDBBpASZIk6EAFWJAY YO9oY0igh88eVVC2XEPHoMCNvsQ41TENkMJI0tH+3hOS6uxV7vOD12Lp61yV+0bodvOg 1zZxtmMZZhLSokNiEnKAkZbO6bC6C3oD6mExzO3RlSd5l6OEks45aRkTr537JQp/EnsO gVSGAQ1nxAnFnCDdWJyhXVDznHKNT9FAy7vKn1GqlUXEDyUnDbmHkvPhwNHy6HgIWU6E dWlQ== X-Gm-Message-State: ALoCoQnH/Fo/wM5Tk8aubzxX6Xu7ovhcuJ7Mt9t57XlyZRP+9jIjK0aVP6xPZLPhTfq3ro0Hvq7K MIME-Version: 1.0 X-Received: by 10.236.17.34 with SMTP id i22mr2880623yhi.110.1391466592534; Mon, 03 Feb 2014 14:29:52 -0800 (PST) Received: by 10.170.144.85 with HTTP; Mon, 3 Feb 2014 14:29:52 -0800 (PST) In-Reply-To: References: Date: Tue, 4 Feb 2014 00:29:52 +0200 Message-ID: To: Yasuo Ohgaki Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Secure Session Module Options by Default From: narf@devilix.net (Andrey Andreev) Hey, >> I was just pointing out that 'use_strict_mode' shouldn't change the >> behavior of session_id(). >> In other words, you don't need a "force" option, because passing a >> custom made ID by itself already tells it to force something. > > > Change has been done already. It does not accept uninitialized ID when > use_strict_mode=On since 5.5. I know that. I'm saying it should work like you suggested without the need of another option. session_id(); // changes session ID to the user-supplied string, regardless of use_strict_mode >> Don't know why you're talking about prefixes here ... nothing to do >> with security. > > > I see many codes that uses insecure session ID. The main reason why > they write such bad code is 'lack of secure ID generation feature'. > > It's security matter, IMHO. Why is that necessary at all? session_regenerate_id() not sufficient? Either way, this shouldn't be a part of this RFC. It's your RFC, but still - it's about changing default settings for improved security, not new features. >> Not that I have any authority around here, but I'd recommend updating >> the RFC to properly explain this. As it stands, it makes it almost >> makes it look like incrementing the 'hash_bits_per_character' value by >> itself increases security, and it doesn't. :) > > > It does not improve security, but it reduces session ID length changed by > this RFC. Are you suggesting another RFC for changing > hash_bits_per_character? > Or are you suggesting I should change the default without a RFC? We've obviously got a language barrier here. All I'm suggesting is that you improve the *wording* in your RFC, so that it is clear why hash_bits_per_character is changed. >> >> That "allow an underscore when hash_bits_per_character=6" is also not >> >> in the scope of security and the hash function itself wouldn't >> >> generate an underscore, so ... what has it got to do with anything? >> > >> > >> > If hash_bits_per_character=6, files save handler uses all chars for >> > session >> > ID and users cannot have prefix delimiter char. User may use string >> > offset, >> > though. That's the reason why there is '_' proposal. >> >> This is hard to follow, I really don't understand why we're talking >> about prefixing here at all and how does it relate to >> 'hash_bits_per_character' or security. > > > To improve security, I proposed larger hash and hash bits to decrease number > of chars. I know there are users that use prefix and delimiter. Why > shouldn't I > address these affected users in the same RFC? > > This security related changes may affect users and if it does, we should > provide > work round for it at the same time if it is feasible. IMHO. Because, as I said above - I thought this RFC was about changing default settings and nothing else. And again, an underscore *is not* a part of the hash, regardless of hash_bits_per_character. I personally don't care about the prefix. It's just that it's a completely new feature that has nothing to do with the default settings and it's just confusing that you mention it in the same context. :) Cheers, Andrey.