note 34548 added to function.setcookie

From: Date: Wed, 30 Jul 2003 15:28:14 +0000
Subject: note 34548 added to function.setcookie
Groups: php.notes 
Request: Send a blank email to php-notes+get-53012@lists.php.net to get a copy of this message
Keep in mind for security's sake that cookies can be edited by the client and stolen from the client. Like $_GET and $_POST, Their data should NOT be trusted. Don't put passwords (even hashes), credit card numbers, SQL query parameters, filenames, or anything else sensitive in them! With particular reference to the auth form from lcattani at urbanet dot ch: it should use session variables and not cookies, since session variables are stored on the server and so their data CAN be trusted. The only way for a client to read his session variables besides through your script is with root access to your web server. In this particular script, anybody could copy the username and MD5 password cookies from the browser's computer - the *real* password is not needed. ---- Manual Page -- http://www.php.net/manual/en/function.setcookie.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34548 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34548&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34548&report=yes

« previous php.notes (#53012) next »