Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-12852

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.1.0-RC4
    • 3.1.0-RC2
    • None
    • None

      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;
      				}
      

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

              Created:
              Updated:
              Resolved: