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

Dragging and dropping a PDF in Atto + Firefox causes base64 inline data

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 3.8.6, 3.9.3, 3.11.8, 4.0.2
    • Text editor Atto
    • None
    • MOODLE_311_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE

      Hi,

      This seems like a bit of a fringe case, but dragging and dropping a PDF file into the Atto editor while using firefox causes an <img> tag with base64 data to be inserted. I tested using : 

      • Firefox 82.0.2
      • Windows 10
      • Moodle 3.8 and 3.9.

      Steps to reproduce :

      • Edit a section or blog post or anywhere that uses the Atto editor
      • Open windows file explorer and drag and drop a PDF file into the Atto editor
      • View the HTML source of the editor
      • You should see something like "<img src="data:application/pdf;base64,JVBERi0xLjcNCiW1tbW1DQ..." />

      Not sure if this can be fixed or not? In Chrome and Internet Explorer, the behaviour is to just open the PDF file. The reason for reporting this is that if someone does this unintentionally, it could cause problems with caching / memcached, because the data inserted can be quite long.

       

            Unassigned Unassigned
            jamaur Jason Maur
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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