Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69338 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64802 invoked from network); 25 Sep 2013 22:49:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Sep 2013 22:49:19 -0000 Authentication-Results: pb1.pair.com header.from=dor.tchizik@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dor.tchizik@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.176 as permitted sender) X-PHP-List-Original-Sender: dor.tchizik@gmail.com X-Host-Fingerprint: 209.85.214.176 mail-ob0-f176.google.com Received: from [209.85.214.176] ([209.85.214.176:43429] helo=mail-ob0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/93-46303-E6863425 for ; Wed, 25 Sep 2013 18:49:19 -0400 Received: by mail-ob0-f176.google.com with SMTP id uy5so757343obc.35 for ; Wed, 25 Sep 2013 15:49:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=dtHLDpZ9Xqw9CtgFtMs82YeiM0cxwHG4HiNyrQ/QjVg=; b=WBlOVvB4vImwYOgxrhnyKRCtBxww6miSPROM8q1wAS/O57XAmRht4EneOV5ITEn+6k siCM3hkNCgv742rt69EgQBGQfL2g1DqwPxP7J/sc4qZLYE1P+69i/IFDmY3mx4qFkyhw qTzp8bS5XQT+rS9zPn1INoymwivyScQcoSQSjdV8AlooI9RIgtRuL6IvR9Auuetyp8Hk MXF1vccUrQp0cRK2wavz7rd3oJttIJ6RmwIfRfMAFi85tzY0JHGrvCR8OTzA9SeaUfxv nqrAajU0UO9tpuNmVesRnsUkvqAPCVEa35JyREEF+uxdMH6iLrPInRGJYTPxZIbyiCET +/iQ== MIME-Version: 1.0 X-Received: by 10.60.43.131 with SMTP id w3mr32578828oel.10.1380149355170; Wed, 25 Sep 2013 15:49:15 -0700 (PDT) Sender: dor.tchizik@gmail.com Received: by 10.182.39.137 with HTTP; Wed, 25 Sep 2013 15:49:15 -0700 (PDT) In-Reply-To: References: Date: Thu, 26 Sep 2013 00:49:15 +0200 X-Google-Sender-Auth: xX4E3iin5KOZ3P4kJTmvAyMGkR4 Message-ID: To: Yasuo Ohgaki Cc: Mike Willbanks , "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Regenerating session ID automatically when IP address has changed From: madara@tchizik.com (Madara Uchiha) Why couldn't this be implemented on userland again? I don't feel this is a language level issue. On Wed, Sep 25, 2013 at 8:55 AM, Yasuo Ohgaki wrote: > Hi Mike, > > On Wed, Sep 25, 2013 at 2:16 PM, Mike Willbanks wrote: > >> Each and every type of prevention measure has consequences and not only >> that but MAJOR consequences. If you are detecting IP changes you rule out >> most if not all major proxy networks that exist. While not first of mind; >> when handling this you can easily remove the old session without properly >> transitioning to the new. This is an option based off of individual >> application vs. a language option or construct. There are a ton of >> different measures that you might take based off of changes to the end user >> data. I think this would be a poor idea in the long run due to the >> consequences that you may incur. > > > The more I get this kind of response, the more I feel we should > introduce this feature as session module optional feature. > > Regenerating session ID should not be any problem as long as > session ID is cookie based, save handler lock session data while > it is used. > > As far as I know, the only faulty save handler is mm save handler. > (I would like to implement lock in mm, but it's low priority for me. > When TranSID is enabled, it would cause problems due to cached > pages.) > > The best practice of the session ID management is regenerating > session ID when events happen. Mandatory one is login event. > Web programmers must regenerate session ID to make sure > session safety at login. > > IP address change is one of the event, even though it's not mandatory. > > There is PHP framework called Piece Framework that has option > regenerate session ID for every request to achieve maximum > session ID security, for example. > > If regeneration of session ID causes misbehavior, then it is a bug > including users fault. > > I think if I disable this feature when TranSID on and/or expire is not 0, > then there would not be issues. Unless web programmers use session > ID for CSRF protection, etc. > > Anyway, I'll start from documentation. > If there are any comments, I'll appreciate it. > > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net