-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
3.11.12, 4.1
-
MOODLE_311_STABLE, MOODLE_401_STABLE
Steps to reproduce:
- Go to https://school.moodledemo.net
- Log in as "teacher"
- Go to a course and turn editing mode on
- Edit any activity, and on the editing form, drag and drop a fairly large video file (in my testing, I used a 76MB file) into the "Description" editor field.
- Save and return to course.
- You will see the error "415 Request entity too large"
When the video is dropped into the Atto editor, it is base64 encoded and added to an <img> tag. In this case, the form submission is larger than the web server is configured to accept, so we see a horrible HTTP error. We have also seen examples where the web server configuration allows the data through and it is inserted into the database, which causes knock on effects when trying to fetch it for the coursemodinfo cache, such as PHP memory limit exhaustion, and max_packet_size errors from MySQL. This prevents the course from loading at all.
Given the problems this can cause, we should probably prevent video content or other large files being embedded like this when drag-and-dropped, or otherwise validate editor fields to ensure we aren't trying to send too much data.
- has a non-specific relationship to
-
MDL-80104 Create an admin tool to migrate bad base64 inline data into file api
-
- Open
-