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

Fix redirect behavior in according to parse_url() behavior changes in PHP 7.1+

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.0-dev, 4.0.0-a1
    • Fix Version/s: 3.2.0-RC2
    • Component/s: Viewing posts
    • Labels:
      None

      Description

      Regarding remaining failures, in PHP 7.1+ parse_url() was changed to be more restrictive and supports RFC3986 now, so it just returns false on urls like http://localhost.foobar.com\\@localhost/troll/http://localhost/ (from our tests). That's why tests fail on expecting exceptions from ```redirect()``` because ```redirect()``` returns url to index page.
      We might want to throw exception in that case as well for consistency instead of redirecting to the same page here https://github.com/phpbb/phpbb/blob/master/phpBB/includes/functions.php#L1712-L1716

      This will fix tests on PHP 7.1 and PHP nightly builds.

      parse_url() output in PHP 7.1+ and older versions (see screenshot).

        Attachments

          Activity

            People

            • Assignee:
              Marc Marc
              Reporter:
              rxu rxu
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: