It's possible (from the UI) to create a circular local file reference, which when viewed, causes the script loading the file to crash, which then holds the user's session open indefinitely.
Steps to reproduce:
- Create a page resource
- Add an image to the page content area
- Edit page
- Go to the page content area and click to add a image
- Select the Course Files repository
- Find the page you just created/are editing
- Select the image you previously added
- Select "Create an alias/shortcut to the file"
- Click select this file
- When prompted, select "Overwrite"
- Finish inserting the image
While it's niche, it seems there are two bugs here:
- You shouldn't be able to create the circular reference in the first page.
- pluginfile.php shouldn't die horrifically when it happens. Ideally, in this particular case it would recognize that is a local file that is actually available, and server it, but just returning cleanly with an error would be ok. (Edit: found MDL-42328 related to this)