[PATCH] Fix for bug #31440 (GLOBALS can be by G/P/C when register_globals=On)

From: Date: Tue, 15 Feb 2005 11:39:04 +0000
Subject: [PATCH] Fix for bug #31440 (GLOBALS can be by G/P/C when register_globals=On)
Groups: php.internals 
Request: Send a blank email to internals+get-14971@lists.php.net to get a copy of this message
    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


« previous php.internals (#14971) next »