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

S_FORUM_ID and S_TOPIC_ID variables set by page_header may cause fatal errors in feeds

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.3.8-RC1
    • 3.2.10, 3.3.4
    • None
    • None

      The S_FORUM_ID and S_TOPIC_ID variables in the page_header function are passed as-is from the user request with only an integer conversion. Integers can be negative, but forum and topic IDs cannot.

      When a request to a valid page with an invalid forum or topic ID in the URL is made, e.g. <https://area51.phpbb.com/phpBB/viewtopic.php?f=-9001&p=348626> or <https://area51.phpbb.com/phpBB/viewtopic.php?t=-9001&p=348626>, and forum feeds are enabled, a negative ID will be passed to the path Twig helper function (phpbb\template\twig\extension\routing::getPath) which will end up being validated by the regular expression /\d+/ (from config/default/routing/feed.yml) and fail, which triggers an uncaught Symfony\Component\Routing\Exception\InvalidParameterException.

            battye battye
            Snover Snover [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: