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

FileAPI accepts invalid characters in filename

    XMLWordPrintable

Details

    • Bug
    • Status: Reopened
    • Minor
    • Resolution: Unresolved
    • 2.6.5
    • None
    • Files API
    • MOODLE_26_STABLE

    Description

      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)

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              geeksmith Chris Megahan
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              13 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

                Created:
                Updated: