Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71549 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40087 invoked from network); 25 Jan 2014 07:42:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jan 2014 07:42:50 -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.215.42 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-la0-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:64539] helo=mail-la0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 89/80-35033-8FA63E25 for ; Sat, 25 Jan 2014 02:42:49 -0500 Received: by mail-la0-f42.google.com with SMTP id hr13so3219504lab.15 for ; Fri, 24 Jan 2014 23:42:45 -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=WVuN1eXPhWs3m1KoF93J04IBjrdROSA6f+tA9TYuMos=; b=Zlcno/gFNcHdKtRpEHq29trmh7n3yAgzCl9hB9giSTbwhDDUoIIWkUS2DHsn9F+0w3 fUgvmz/A39xlqGlTo3DvuJEdrFJDWWo/ov1qjeMVcUiwwbhgv7IrIroreaFYdIXm0DQz XRmusleICA9TySzp/wAAeqr2TrUVK9WECtUEq3THhmx06bovKkN45EcZD72W2uEgQA/c 8dRrGUI1v3sRuNWKNPIyXqqKZIKPoVqDP6DGtCURjw6wTUEmsvKXgPqhdfLjPzhkWOhN ONffoRbT+/mwZCPbWO+jyENSt4gC1v4CIs9hh7hwP34mVMyq2x/V8aJSfC29ZFyaG6FT lJJA== X-Received: by 10.112.139.35 with SMTP id qv3mr13685lbb.47.1390635765652; Fri, 24 Jan 2014 23:42:45 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.132.134 with HTTP; Fri, 24 Jan 2014 23:42:05 -0800 (PST) In-Reply-To: References: <52E319F2.8080705@sugarcrm.com> Date: Sat, 25 Jan 2014 16:42:05 +0900 X-Google-Sender-Auth: G0MD-m8HZ_xR93e089rX4Al0X88 Message-ID: To: Andrey Andreev Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e0115fb12d2e2ec04f0c69ecc Subject: Re: [PHP-DEV] Session IP address matching From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e0115fb12d2e2ec04f0c69ecc Content-Type: text/plain; charset=UTF-8 Hi all, On Sat, Jan 25, 2014 at 4:32 PM, Yasuo Ohgaki wrote: > On Sat, Jan 25, 2014 at 12:09 PM, Andrey Andreev wrote: > >> Still, that is not optimal. The desired effect is to call the session file >> something like: >> >> __ >> >> I can't think of a way of making that happen, so I guess a work-around >> would be to do: >> > > I've just written session_create_id(string $prefix) today. > You can do that easily and securely with session_create_id(). > It would be in 5.6. > > You may check easily with user script whatever prefix means. > > NOTE: No one should not expose sensitive data in prefix! > If anyone would like to prefix by IP address, store it like session_create_id(sha1($secret.$IP_ADDR).'-'); Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e0115fb12d2e2ec04f0c69ecc--