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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.2.0-dev, 4.0.0-a1
    • 3.2.0-RC2
    • Viewing posts
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: