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

Drag and dropping a video into an atto editor can break your course

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_401_STABLE

      Steps to reproduce:

      1. Go to https://school.moodledemo.net
      2. Log in as "teacher"
      3. Go to a course and turn editing mode on
      4. 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.
      5. Save and return to course.
      6. 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.

            Unassigned Unassigned
            marxjohnson Mark Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.