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

webservice/pluginfile.php doesn't accept token for assignsubmission_onlinetext

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.6.2
    • Fix Version/s: None
    • Component/s: Files API, Web Services
    • Labels:
      None
    • Affected Branches:
      MOODLE_26_STABLE

      Description

      I have a external application that needs to download attached files to an assignsubmission using onlinetext.

      The solution was working fine on Moodle 2.4 but, as we updated it to Moodle 2.6 I started receiving a json response from where it should be sending the images.

      here is two example URLs:

      http://moodle.local/pluginfile.php/18251/assignsubmission_onlinetext/submissions_onlinetext/19164/wallpaper.jpg

      http://moodle.local/webservice/pluginfile.php/18251/assignsubmission_onlinetext/submissions_onlinetext/19164/wallpaper.jpg?token=...

      The first is the one generated inside moodle, and the second one is the one suitable for the external application.

      While the first display correctly the image, the second gives me the following output error:

      { error: "Detectado redirecionamento não suportado. A execução do script foi cancelada ", stacktrace: "* line 2565 of /lib/weblib.php: moodle_exception thrown * line 3148 of /lib/moodlelib.php: call to redirect() * line 44 of /mod/assign/submission/onlinetext/lib.php: call to require_login() * line 4634 of /lib/filelib.php: call to assignsubmission_onlinetext_pluginfile() * line 54 of /webservice/pluginfile.php: call to file_pluginfile() ", debuginfo: " Error code: redirecterrordetected", reproductionlink: "http://moodle.local/" }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                brodock Gabriel Mazetto
                Participants:
                Component watchers:
                Matteo Scaramuccia, Jake Dallimore, Jun Pataleta, Juan Leyva, Jake Dallimore, Jun Pataleta
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: