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

GDPR data request export not usable when using special characters (invalid file paths) - Part 2

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_39_STABLE

      Description

      As reported by Simon Brenner in MDL-66245:

      This is not fixed completely.

      Moodle objects like course titles and forum post titles containing a question mark are not exported correctly in GDPR data export requests on Windows servers.

      Taking a look inside the logs shows that this results in moodle trying to create subfolders with a question mark in their name in the temp folder which results in the file not being saved correctly (line 97 of \privacy\classes\local\request\moodle_content_writer.php: call to core_privacy\local\request\moodle_content_writer->write_data()).

      Unfortunately the overall processing succeeds and the user gets his export zip file. The problematic contents is missing however.

      If a sub folder that moodle tries to create contains a space at the end of the folders title, errors appear in the logs and the export creation fails:

      [20-Apr-2021 10:09:12 Europe/Berlin] PHP Warning: file_put_contents(C:\Users\ADMINI~1\AppData\Local\Temp/requestdir/Z7Vw\607e8bd772f60\607e8c1dbed81\System _.1\Kursbereich Archivierte Ältere… _.6010\Kursbereich Marketing… _.6014\Kurs 3 - MM71.a Projekt des ang… _.38337\Forum Ankündigungen _.38342\Themen\8023-laptop \data.json): failed to open stream: No such file or directory in D:\www\moodle\privacy\classes\local\request\moodle_content_writer.php on line 395

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jpataleta Jun Pataleta
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, 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:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 10 minutes
                  10m