note 84358 added to security.globals
| From: | stranger at teuton dot org | Date: | Thu, 10 Jul 2008 11:48:49 +0000 |
| Subject: | note 84358 added to security.globals | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-141355@lists.php.net to get a copy of this message | ||
RE: Anonymous on oirinely at yahoo dot com
Actually oirinely is correct. With register_globals on any key in $_SESSION becomes a global
variable when session_start() happens. This means that assigning a value to any variable that has
the same name as any existing $_SESSION key (when register_globals is on and session_start() has
happened) is the same as assigning to $_SESSION
e.g.
<?php
session_start();
$_SESSION['foo'] = 1;
$foo = 2;
echo $_SESSION['foo'];
?>
result = 1
----
Server IP: 87.124.64.96
Probable Submitter: 217.155.151.254
----
Manual Page -- http://www.php.net/manual/en/security.globals.php
Edit -- https://master.php.net/note/edit/84358
Del: integrated -- https://master.php.net/note/delete/84358/integrated
Del: useless -- https://master.php.net/note/delete/84358/useless
Del: bad code -- https://master.php.net/note/delete/84358/bad+code
Del: spam -- https://master.php.net/note/delete/84358/spam
Del: non-english -- https://master.php.net/note/delete/84358/non-english
Del: in docs -- https://master.php.net/note/delete/84358/in+docs
Del: other reasons-- https://master.php.net/note/delete/84358
Reject -- https://master.php.net/note/reject/84358
Search -- https://master.php.net/manage/user-notes.php