Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-40379

pluginfile.php redirects to login page on mobile data

    Details

    • Testing Instructions:
      Hide

      (difficulty: difficult, requires one of those mobile network providers that apply conversions to at least images)

      1. Create some content, images included, in Moodle e.g. lessons to let Moodle serve those content bits;
      2. The content is regularly showed in the browser with the same resolution;
      3. (Optional but alternative to having a mobile network provider like the one described above) Use the Developer Tools of your browser by pressing F12 and look at the network tab to check that each content delivered by Moodle through its helpers (pluginfile.php) contains no-trasform in the Cache-Control headers, at least once per request.
      Show
      (difficulty: difficult, requires one of those mobile network providers that apply conversions to at least images) Create some content, images included, in Moodle e.g. lessons to let Moodle serve those content bits; The content is regularly showed in the browser with the same resolution; (Optional but alternative to having a mobile network provider like the one described above) Use the Developer Tools of your browser by pressing F12 and look at the network tab to check that each content delivered by Moodle through its helpers ( pluginfile.php ) contains no-trasform in the Cache-Control headers, at least once per request.
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      m27_MDL-40379_Prevent_Some_Mobile_Network_Providers_From_Modifying_Content

      Description

      I'm researching a problem with pluginfile.php. I also checked it already on demo.moodle.net so it's no site/server specific issue itself.

      Whilst beeing on wifi or a regular connection or on a desktop computer, the problem does NOT exist. But if I access e.g. a lesson content page, with a picture in it, which was uploaded with TinyMCE, my browser (also tested various browsers on my android phone) displays a question mark sign. If I refresh that page, the picture shows up. This just happens to me on the Vodafone network in Germany. On the T-Mobile network (also in GER) with an iPhone 5 the picture doesnt even show up upon refresh. Navigating to the next page succeeds, but again, no picture.

      I further investigated this with apache logs/tcpdump on the server side and found out, that the user gets redirected with http code 303 to the login page. So, to see that very lesson page, I need to be logged in already, so this cant be the case. Disabling require_course_login in mod/lesson/lib.php the function lesson_pluginfile solves the issues, but this cant obviously be the solution. Somehow, the mobile data proxies of the carriers interfere with Moodle and/or the session.

      With tcpdump, I noticed, there is no session cookie being sent along with the GET-request for pluginfile.php/ID/mod_lesson/PAGEID/filename.jpg. Any other clues about this?

        Gliffy Diagrams

          Attachments

          1. screenshot-1.jpg
            screenshot-1.jpg
            104 kB
          2. screenshot-2.jpg
            screenshot-2.jpg
            148 kB
          3. screenshot-3.jpg
            screenshot-3.jpg
            107 kB
          4. screenshot-4.jpg
            screenshot-4.jpg
            89 kB

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Jan/14