note 65856 added to security.globals
| From: | sineld at sineld dot com | Date: | Tue, 09 May 2006 02:30:39 +0000 |
| Subject: | note 65856 added to security.globals | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-110921@lists.php.net to get a copy of this message | ||
This is the code which makes the valiables act like register_globals on
<?php
$parser_version = phpversion();
if ($parser_version <= "4.1.0") {
$GET_VARS = $HTTP_GET_VARS ;
$POST_VARS = $HTTP_POST_VARS;
$SERVER_VARS = $HTTP_SERVER_VARS;
$COOKIES = $HTTP_COOKIE_VARS;
}
else{
$GET_VARS = $_GET;
$POST_VARS = $_POST;
$SERVER_VARS = $_SERVER;
$COOKIES = $_COOKIE;
}
if ($SERVER_VARS['REQUEST_METHOD'] == "POST"){
foreach ($POST_VARS as $key => $val){
$$key = $val;
}
}
elseif($SERVER_VARS['REQUEST_METHOD'] == "GET"){
foreach ($GET_VARS as $key => $val){
$$key = $val;
}
}
?>
----
Server IP: 85.111.4.6
Probable Submitter: 85.98.106.230
----
X-Spam-Status: No, hits=3.9 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER,
UPPERCASE_50_75 autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/security.globals.php
Edit -- http://master.php.net/note/edit/65856
Del: integrated -- http://master.php.net/note/delete/65856/integrated
Del: useless -- http://master.php.net/note/delete/65856/useless
Del: bad code -- http://master.php.net/note/delete/65856/bad+code
Del: spam -- http://master.php.net/note/delete/65856/spam
Del: non-english -- http://master.php.net/note/delete/65856/non-english
Del: in docs -- http://master.php.net/note/delete/65856/in+docs
Del: other reasons-- http://master.php.net/note/delete/65856
Reject -- http://master.php.net/note/reject/65856
Search -- http://master.php.net/manage/user-notes.php