note 81947 added to security.globals
| From: | subarea at osu1 dot php dot net | Date: | Thu, 20 Mar 2008 16:43:17 +0000 |
| Subject: | note 81947 added to security.globals | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-137238@lists.php.net to get a copy of this message | ||
If you have no access to php.ini and the solution with
the .htaccess entry (php_flag register_globals 0)
also doesn't work or you are just a little bit paranoid,
you can use the following script.
this is just a workaround to kill all (through register globals) imported vars!
<?php
foreach(array_keys($_REQUEST) as $var_to_kill) unset($$var_to_kill);
foreach(array_keys($_SESSION) as $var_to_kill) unset($$var_to_kill);
foreach(array_keys($_SERVER) as $var_to_kill) unset($$var_to_kill);
unset($var_to_kill);
?>
if you like it, just drop me a line...
greetz subarea
----
Server IP: 212.124.37.9
Probable Submitter: 89.14.163.125
----
Manual Page -- http://www.php.net/manual/en/security.globals.php
Edit -- https://master.php.net/note/edit/81947
Del: integrated -- https://master.php.net/note/delete/81947/integrated
Del: useless -- https://master.php.net/note/delete/81947/useless
Del: bad code -- https://master.php.net/note/delete/81947/bad+code
Del: spam -- https://master.php.net/note/delete/81947/spam
Del: non-english -- https://master.php.net/note/delete/81947/non-english
Del: in docs -- https://master.php.net/note/delete/81947/in+docs
Del: other reasons-- https://master.php.net/note/delete/81947
Reject -- https://master.php.net/note/reject/81947
Search -- https://master.php.net/manage/user-notes.php