Moodle
  1. Moodle
  2. MDL-40002

ETag value must be a quoted-string

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.3.8, 2.4.5, 2.5.1
    • Component/s: Files API
    • Labels:
      None
    • Testing Instructions:
      Hide

      (difficulty: easy, requires to use a network sniffer)

      1. Open a 3rd party network sniffer e.g. Fiddler and start capturing the network (HTTP) traffic. For Fiddler, press F12
      2. Open your preferred browser e.g. Chrome and cleanup its cache
      3. Point the browser to the home of your Moodle instance
      4. Check each captured response: HTTP Status must be 200 and in the Response Headers, the ETag value - available for any CSS/Image/JS provided by Moodle - must be surrounded by quotes
      5. Redo a browser request to the same page: now any of the above response will be provided by the browser cache, the HTTP Status must be equal to 304
      Show
      (difficulty: easy, requires to use a network sniffer) Open a 3rd party network sniffer e.g. Fiddler and start capturing the network (HTTP) traffic. For Fiddler, press F12 Open your preferred browser e.g. Chrome and cleanup its cache Point the browser to the home of your Moodle instance Check each captured response: HTTP Status must be 200 and in the Response Headers , the ETag value - available for any CSS / Image / JS provided by Moodle - must be surrounded by quotes Redo a browser request to the same page: now any of the above response will be provided by the browser cache, the HTTP Status must be equal to 304
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull from Repository:
    • Pull 2.4 Branch:
      m24_MDL-40002_ETag_value_must_be_a_quoted-string
    • Pull 2.5 Branch:
      m25_MDL-40002_ETag_value_must_be_a_quoted-string
    • Pull Master Branch:
      m26_MDL-40002_ETag_value_must_be_a_quoted-string
    • Rank:
      50747

      Description

      Starting from the investigations reported in MDL-39832, it appears that ETag has not been correctly quoted as required per RFC2616: issues have been actually found only in serving files via lib/filelib.php e.g. pluginfile.php under some circumstances (see MDL-39832 for details).

        Issue Links

          Activity

          Hide
          Matteo Scaramuccia added a comment -

          Hi Petr,
          here is the simple extension of MDL-39832, even if here HTTP 206 requests won't happen.
          Not sure about the backport: my suggestion (to you and the integrators) is to do at least 2.5.

          Show
          Matteo Scaramuccia added a comment - Hi Petr, here is the simple extension of MDL-39832 , even if here HTTP 206 requests won't happen. Not sure about the backport: my suggestion (to you and the integrators) is to do at least 2.5.
          Hide
          Petr Škoda added a comment -

          +3, thanks a lot, sending to integration

          Show
          Petr Škoda added a comment - +3, thanks a lot, sending to integration
          Hide
          Dan Poltawski added a comment -

          Integrated to master, 25, 24 and 23 - thanks guys

          Show
          Dan Poltawski added a comment - Integrated to master, 25, 24 and 23 - thanks guys
          Hide
          Sam Hemelryk added a comment -

          Thanks Matteo, tested and passed

          Show
          Sam Hemelryk added a comment - Thanks Matteo, tested and passed
          Hide
          Marina Glancy added a comment -

          Thanks for your awesome work! This has now become a part of Moodle.

          Closing as fixed!

          Show
          Marina Glancy added a comment - Thanks for your awesome work! This has now become a part of Moodle. Closing as fixed!

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: