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

Fix tool_installaddon to not abuse make_temp_directory

    XMLWordPrintable

Details

    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_30_STABLE

    Description

      From what I can tell, admin/tool/installaddon/index.php is abusing make_temp_directory by storing files within it which persist from request to request.

      make_temp_directory() is intended for same-request-only use.

      The file is stored in filedir, but is stored as $zipfilename within $sourcedir (a temp directory). It's then passed to the validate page as a param to $nexturl.

      The version.php is extracted first (correctly using file packers), but is then saved to a workingdir. It doesn't appear that it's ever used after it's been read once.

      In short, I can't see any reason that installaddon needs to make use of persistent temp directories and we should remove them.

      Attachments

        Issue Links

          Activity

            People

              mudrd8mz David Mudrák (@mudrd8mz)
              dobedobedoh Andrew Lyons
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                16/Nov/15