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

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

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-RC2
    • Fix Version/s: 3.1.0-RC4
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: