Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72789 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60598 invoked from network); 24 Feb 2014 09:50:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2014 09:50:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.160.170 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.160.170 mail-yk0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:45881] helo=mail-yk0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6F/D2-46513-AE51B035 for ; Mon, 24 Feb 2014 04:50:36 -0500 Received: by mail-yk0-f170.google.com with SMTP id 9so13788653ykp.1 for ; Mon, 24 Feb 2014 01:50:31 -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=dcd4jvcQOcCsNlffICwZpW/rxxDWHhJvIH403LfqILs=; b=KsHW4gTPk7jxMAuVrbtu7FgYW9CZ+Y8zzIA0T5Ih0FbRgcytYTr3WBpVLlwfPkePmK L3cMu6LItYHi7xWbB64AsqBnFP0StNT/NTy471wb4gsr7Z5Xd1fBWERQB4YyFLx3p1bM nm3Vnvu0y3JiEc5x5SZID9VKrbuqfnpwSEhcg= 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=dcd4jvcQOcCsNlffICwZpW/rxxDWHhJvIH403LfqILs=; b=ci2NmP6XAG6BCAk2oJnTrBIUga+J4TFzHTvJUeIxexUyY/OboaZktR0meVAQfbc8Sj rMv1E4GDMNyDSGEtJik5Q4/nHe9udfUegpzXbX2UE9gLJ50sFq9bu4FbsboA0BW2EhP1 JghVi2nI0ol+D9BEkX8WbSBoR6lvMotdoi3jTth6q51O1e2p9ihyrcp0uxhKqALypGja Ba83h+V/uFTyVzXJ/ErK8+JR+Qe6kkvrCGD/V7+uAnPGGiMgUxpmtH/wokmgXN4pNP0v wiJ+/5Vd5L5XVzOnQ5aSirFd8vGA+aPOQIB/xA3tFXwbTm7+Tky7FNk4MiFPoCEmT4UC v/kQ== X-Gm-Message-State: ALoCoQmw5SaFEkuigRQYAa2gUccSLsT5Bbgo1GwAPmegGo1KaXI2ItCk9NEsmNNQdNYR6KIUJMQN MIME-Version: 1.0 X-Received: by 10.236.81.237 with SMTP id m73mr29372969yhe.29.1393235431072; Mon, 24 Feb 2014 01:50:31 -0800 (PST) Received: by 10.170.188.139 with HTTP; Mon, 24 Feb 2014 01:50:31 -0800 (PST) In-Reply-To: References: <5302ABF6.60407@sugarcrm.com> Date: Mon, 24 Feb 2014 11:50:31 +0200 Message-ID: To: Yasuo Ohgaki Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [VOTE] Secure Session Module Options/Internal by Default From: narf@devilix.net (Andrey Andreev) On Mon, Feb 24, 2014 at 11:31 AM, Yasuo Ohgaki wrote: >> >> > - Hash used by session may fallback to SHA-1 from SHA-256 >> >> >> >> What?! Why would that happen? >> > >> > >> > ext/hash could be DL module. There is #if for this case. >> >> This is a more serious flaw than the one you're trying to protect >> against. I'd suggest one of the following: >> >> - Force ext/hash to be dynamically loaded when session wants to use it. >> - Not give the ability to disable the extension at all. >> - Emit E_WARNING when a user tries to use an unavailable algorithm. >> >> Actually, the last one should be done anyway, IMO. > > > OK. Third one seems the one to me, too. > > - hash_bits_per_character will be removed from the RFC. > - Possible issue with ID length change will be documented. > - "id_length" will be removed. User should use hash index search. > - Raise error when hash function is not available. I'd be happy with that, yes. :) Although for hash_bits_per_character, I only insisted the RFC to explain that this is a change complementing hash_function. > > Raising error seems not good... > If hash extension is available always, it might be easier for other module, > too. > Do not allow DL/disabling hash extension, perhaps? I see no reason why anybody would want to disable the Hash extension, so sure - I'd remove that choice. However, silent fallback for stuff like this is never a good thing and somebody might i.e. make a typo while configuring, so why not raise E_WARNING for invalid hash_function regardless? Cheers, Andrey.