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

GDPR data request export not usable in Windows (invalid file paths)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.5.7, 3.6.5, 3.7, 3.7.1
    • Fix Version/s: None
    • Component/s: Privacy
    • Labels:
      None
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE

      Description

      This is a follow-up issue arising from the code change in the context of issue https://tracker.moodle.org/browse/MDL-64511. I confirmed the problem for current versions of Chrome, Firefox and Edge Dev Build on Windows 10.

      If you try to access the data.json files by clicking in the navigation bar of the index.html file, which has been exported by a data request, the corresponding data is not loaded. For example, the error message in Chrome is "GET file:///[...]/export/Kernsystem%20_.1*%2F*data.js net::ERR_INVALID_URL".

      The problem is that the 'slash' in the data path is encoded as '%2F'. Obviously, for some combinations of browser and operating system, slashes must not be encoded. In Windows the error message also remains when you use XAMPP as local web server to serve the data export and try to access it via http.

      The usage of encodeURIComponent in line 65 of the js/general.js seems to be problematic. I have experimented with a possibility to restore slashes after the encoding with the replace function:

      E.g. newscript.src = encodeURIComponent(data).replace(/%2F/g, "\/");

      However, the only reasonable solution in my view is to avoid all special html symbols in the file names of the export and to use encodeURI instead of encodeURIComponent afterwards.

      As most users probably use Windows with Chrome or Firefox in my opinion this is an urgent problem.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebabo Sebastian B
              Participants:
              Component watchers:
              Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: