Re: [PATCH] Fix for bug #31440 (GLOBALS can be by G/P/Cwhen register_globals=On)
| From: | Steph | Date: | Wed, 16 Feb 2005 05:37:28 +0000 |
| Subject: | Re: [PATCH] Fix for bug #31440 (GLOBALS can be by G/P/Cwhen register_globals=On) | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-15007@lists.php.net to get a copy of this message | ||
Can anyone give me a good reason we still have register_globals in PHP 5 at
all?
I mean, it's been marked 'deprecated' forever....
Just my 2 sheks,
- Steph
----- Original Message -----
From: "Ilia Alshanetsky" <ilia@prohost.org>
To: "Andi Gutmans" <andi@zend.com>
Cc: "Jani Taskinen" <sniper@iki.fi>; <internals@lists.php.net>
Sent: Wednesday, February 16, 2005 5:01 AM
Subject: Re: [PHP-DEV] [PATCH] Fix for bug #31440 (GLOBALS can be by
G/P/Cwhen register_globals=On)
> IMO this is something that should be marked as Won't Fix and hope that
> by PHP 5.2 we can drop register_globals all together. Heck, perhaps we
> can do it for PHP 5.1.
>
> Ilia
>
> Andi Gutmans wrote:
> > This behavior makes some sort of sense. It happens when register_globals
> > is on which means you are supposed to be able to access $GLOBALS[] and
> > it makes sense for it to stay in sync with the global variables.
> > Maybe $GLOBALS[] and $GLOBALS direct access are edge cases but should we
> > invest time and code to resolve this when we know it's a general problem
> > anyway?
> >
> > Andi
> >
> > At 01:39 PM 2/15/2005 +0200, Jani Taskinen wrote:
> >
> >> Patch to fix is here:
> >>
> >>
> >> http://www.php.net/~jani/patches/bug31440.php_4_3_patch
> >>
> >> http://www.php.net/~jani/patches/bug31440.php_HEAD_patch
> >>
> >> In PHP_4_3 you can overwrite GLOBALS with these queries:
> >>
> >> ?GLOBALS[foo]=err or ?GLOBALS[]=foo or ?GLOBALS=foo
> >>
> >> In HEAD you can overwrite GLOBALS with this only:
> >>
> >> ?GLOBALS=foo
> >>
> >> I didn't investigate WHY that is the only type of query that
> >> "works" in HEAD branch but the same patch fixed that too.
> >>
> >> None of super-globals can be overwritten like this, be it
> >> register_globals On or Off.
> >>
> >> IMNSHO, GLOBALS should be "protected".
> >> (I don't say that this hacky patch of mine is the way, but it does
> >> the job :)
> >>
> >> --Jani
> >>
> >> --
> >> PHP Internals - PHP Runtime Development Mailing List
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>