note 50288 added to features.cookies

From: Date: Wed, 23 Feb 2005 21:04:12 +0000
Subject: note 50288 added to features.cookies
Groups: php.notes 
Request: Send a blank email to php-notes+get-85453@lists.php.net to get a copy of this message
I found a solution for protecting session ID without tying them to client's IP. Each session ID gives access for only ONE querry. On the next querry, another session ID is generated and stored. If somebody hacks the cookie (or the session ID), the first one of the user and the pirate that will use the cookie will get the second disconnected, because the session ID has been used. If the user gets disconnected, he will reconnect : as my policy is not to have more than one session ID for each user (sessions entries have a UNIQUE key on the collomn in which is stored user login), every entries for that user gets wiped, a new session ID is generated and stored on users dirve : the pirate gets disconnected. This lets the pirate usually just a few seconds to act. The slower visitors are browsing, the longer is the time pirates get for hacking. Also, if users forget to explicitly end their sessions .... some of my users set timeout longer than 20 minutes ! IMPORTANT NOTE : This disables the ability of using the back button if you send the session ID via POST or GET. ---- Manual Page -- http://www.php.net/manual/en/features.cookies.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50288 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50288&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50288&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50288&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50288&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50288&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50288&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85453) next »