Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10149

deregister_globals causes error when cookie called GLOBALS is set to scalar value

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • None
    • 3.0.9-RC1
    • None
    • None
    • Apache/2.2.17 (Win32) PHP/5.3.4,MySQL/5.5.8

    Description

      				
      $cookie = &$_COOKIE;
      while (isset($cookie['GLOBALS']))
      {
        foreach ($cookie['GLOBALS'] as $registered_var => $value)
        {     
          if(!isset($not_unset[$registered_var]))                       
          {		
            unset($GLOBALS[$registered_var]);
          }
        }
        $cookie = &$cookie['GLOBALS'];
      }               
      

      These code inside function deregister_globals() in common.php.
      I add code

      setcookie('GLOBALS', 'TEST');
      deregister_globals();
      

      to test function deregister_globals(),and the firefox show
      Fatal error: Cannot create references to/from string offsets nor overloaded objects in D:\workspace\phpbb\common.php on line 89

      Attachments

        Activity

          People

            naderman Nils Adermann
            workschen workschen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: