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

FileAPI accepts invalid characters in filename

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.6.5
    • Fix Version/s: None
    • Component/s: Files API
    • Labels:
    • Affected Branches:
      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              matteo Matteo Scaramuccia
              Reporter:
              geeksmith Chris Megahan
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              6 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated: