note 88519 added to session.security

From: Date: Tue, 27 Jan 2009 19:41:17 +0000
Subject: note 88519 added to session.security
Groups: php.notes 
Request: Send a blank email to php-notes+get-149858@lists.php.net to get a copy of this message
In addition to ip-address binding not always being effective, it can also prevent users connecting through a proxy-pool from even being able to use your site. In such a scenario, a person's IP address may very well change with every access. If you're handling anything remotely secure, the only safe option is HTTPS. If the data doesn't need to be that secure, than you should not allow a high-jacked session to do too much damage. Basically, don't assume that a person really is who they pretend to be just because the session says a person authenticated with a username and password: it may have been that person who logged in, but that doesn't mean it's still that person. So if you're going to do something like change passwords or something, require them to authenticate again on the same form. Of course this needs to be done in some secure way, as well, so that the password is not just floating over the network. A good way to do this is sending a nonce (number-used-once) along with the form and some javascript to concatenate the nonce to the password, then perform a cryptographic hash of the combined string. The resulting valid-once "password" should then be sent instead of the plain text password. To be effective, you also need to prevent people from using the form if they don't have JavaScript enabled. You can do this by disabling the form fields in HTML, then re-enabling them in JavaScript. ---- Server IP: 193.95.141.37 Probable Submitter: 82.150.6.100 ---- Manual Page -- http://www.php.net/manual/en/session.security.php Edit -- https://master.php.net/note/edit/88519 Del: integrated -- https://master.php.net/note/delete/88519/integrated Del: useless -- https://master.php.net/note/delete/88519/useless Del: bad code -- https://master.php.net/note/delete/88519/bad+code Del: spam -- https://master.php.net/note/delete/88519/spam Del: non-english -- https://master.php.net/note/delete/88519/non-english Del: in docs -- https://master.php.net/note/delete/88519/in+docs Del: other reasons-- https://master.php.net/note/delete/88519 Reject -- https://master.php.net/note/reject/88519 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#149858) next »