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

Improve file name cleaning when file export/serving/zipping

    XMLWordPrintable

Details

    • MOODLE_26_STABLE

    Description

      PARAM_FILE has been designed to remove dangerous characters or patterns from file names. It would be a good idea to create a function which cleans up file names so that they're compliant with most platforms.

      This does not imply to strip out all characters but [a-z0-9_.-] but to replace some illegal ones with an underscore (? / \ *, etc ...) and to trim the extract spaces.

      Zipping files is probably the trickiest part as we could end up with multiple files having the same name. We could also break things like an HTML document if those funky file names were used as references, but what can we do about it?

      Attachments

        Issue Links

          Activity

            People

              moodle.com moodle.com
              fred Frédéric Massart
              Matteo Scaramuccia, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: