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

\phpbb\path_helper get_url_parts does not handle get variable with no value

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.1.0-RC2
    • 3.1.0-RC4
    • None
    • None

    Description

      If you do something like :

      append_sid($phpbb_root_path . "script.$php_ext", "do=something&continue");
      

      You get a notice :

      [phpBB Debug] PHP Notice: in file [ROOT]/phpbb/path_helper.php on line 356: Undefined offset: 1
      

      Because the code assumes that a value is set for the $_REQUEST's 'continue' key :

      				list($key, $value) = explode('=', $argument, 2);
      

      I don't think phpbb should enforce such restrictions on urls. Fix could be to wrap this with a strpos test :

      				if (strpos($argument, '=') !== false)
      				{
      					list($key, $value) = explode('=', $argument, 2);
      				}
      				else
      				{
      					$key = $argument;
      					$value = null;
      				}
      

      Attachments

        Activity

          People

            nicofuma nicofuma
            dcz dcz [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: