note 25906 deleted from security.globals by philip

From: Date: Wed, 14 Jul 2004 21:46:52 +0000
Subject: note 25906 deleted from security.globals by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-73243@lists.php.net to get a copy of this message
Note Submitter: sorry, too much spam ---- If you are forced to have register_globals=on because of old code, but you are starting a new project and you want to make sure you don't accidentally use global vars in your new code, you can run this snippet to unset any global vars that were set. $arr = array_merge(&$_ENV,&$_GET,&$_POST,&$_COOKIE,&$_SESSION); while(list($key) = each($arr)) unset(${$key}); I am sure this does not provide any extra security, and is certainly not as effective as setting register_globals=off, but should keep you from writing more 'bad' code by forcing you to use super globals. Anybody have a better way? please post

« previous php.notes (#73243) next »