Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-2718

Loading course triggers web service request with no token

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5.2
    • Fix Version/s: None
    • Component/s: Courses
    • Labels:
    • Affected Branches:
      MOODLE_35_STABLE

      Description

      When loading a course, an HTTP request is triggered for the course's header image.  However, this request is made without a token, so the request fails, and triggers an exception in webservice/pluginfile.php.  This occurs even when using a custom course format.  We are seeing the following in our PHP logs as a result:

      Default exception handler: A required parameter (token) was missing Debug: 
      Error code: missingparam
      * line 482 of /lib/setuplib.php: moodle_exception thrown
      * line 573 of /lib/moodlelib.php: call to print_error()
      * line 45 of /webservice/pluginfile.php: call to required_param()
      

      Step to reproduce:

      1. Visit https://mobileapp.moodledemo.net/ in chrome
      2. Enter https://school.demo.moodle.net/ and log in as "student", password "moodle"
      3. Click on Dashboard, and select the "Celebrating cultures" course.
      4. Press F12 to open developer tools. Switch to the Network tab and clear the log.
      5. Pull to refresh.
      6. You will see a failed request for https://school.demo.moodle.net/webservice/pluginfile.php/1033/course/overviewfiles/diversity.jpg. Note that the URL does not include the web service token.

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            marxjohnson Mark Johnson
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: