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

FileAPI accepts invalid characters in filename

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 2.6.5
    • Files API
    • MOODLE_26_STABLE

      The FileAPI accepts files with filenames that contain characters which are illegal in some operating systems. This can cause issues when those files are created in a OS where the filename is legal, then downloaded to one where they are illegal.

      Example:
      A student using MacOSX creates a file and saves it as

       assignment_*NEW*_#2.docx 

      . Student submits this file on a assignment module attempt.

      A teacher using Windows Vista opens assignment module and selects "Download all submissions". The submission

       assignment_*NEW*_#2.docx 

      is not displayed because it contains illegal characters in its filename.

      Suggestion:
      Clean filenames to strip characters / ? < > \ : * | " when a file is saved.

       

      Additional note: we will also need to strip ';' from the filename as recent tests showed that this was causing issues down the line (see MDL-79016)

       

            Unassigned Unassigned
            geeksmith Chris Megahan
            Votes:
            13 Vote for this issue
            Watchers:
            18 Start watching this issue

              Created:
              Updated:

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