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

Referencing a file which requires login leads to a bad redirect when logging in

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.2
    • Fix Version/s: None
    • Component/s: Files API
    • Labels:
    • Testing Instructions:
      Hide

      1/ Create a new course
      2/ Upload a new image resource to the course. copy he url of the uploaded image
      3/ Go to the site frontpage,
      4/ Add a topic section to the frontpage, and embed the uploaded image from the previous course to the frontpage
      5/ Start a new browser session (e.g. chrome incognito window) and visit moodle site
      6/ Login to site in incognito window

      Expected result:

      • Logged into moodle as normal

      Actual result:

      • Redirected to image file which was embeded
      Show
      1/ Create a new course 2/ Upload a new image resource to the course. copy he url of the uploaded image 3/ Go to the site frontpage, 4/ Add a topic section to the frontpage, and embed the uploaded image from the previous course to the frontpage 5/ Start a new browser session (e.g. chrome incognito window) and visit moodle site 6/ Login to site in incognito window Expected result: Logged into moodle as normal Actual result: Redirected to image file which was embeded
    • Affected Branches:
      MOODLE_22_STABLE
    • Pull Master Branch:

      Description

      It seems that the wantsurl redirection is again broken on 2.x similar to MDL-14495, moodle will try and redirect a user to an image if embeded incorrectly before being logged in.

      There is a require_login flag preventing this, although it looks like file_pluginfile calls require_login a crazy amount of times

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: