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

sid parameter forced for style.php makes caching difficult

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 3.0.8-RC1
    • 3.0.7-PL1
    • Other
    • None
    • All

      Around includes/functions.php:4167 the sid is explicitly forced for the T_STYLESHEET_LINK variable. This sid parameter is used in style.php to find which user is viewing the style. Unfortunately, this makes it difficult to perform server side caching of page output for anonymous users.

      The solution is to remove forcing the SID and rely on the standard behaviour if cookies are disabled. style.php should be modified to secondarily use $_COOKIE['sid'] if $_GET['sid'] is not set.

      If cookies are enabled, the SID is not added on subsequent page loads, and style.php uses the cookie value (which has been established to exist). The appropriate style will be shown.

      If cookies are disabled, the SID is added to the style.php url as it is to all urls. style.php uses the specified sid to find the user, and the correct style is displayed.

            A_Jelly_Doughnut A_Jelly_Doughnut
            ckwalsh Cullen Walsh [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: