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

Fix tool_installaddon to not abuse make_temp_directory

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      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

              • Assignee:
                mudrd8mz David Mudrák (@mudrd8mz)
                Reporter:
                dobedobedoh Andrew Nicols
                Participants:
                Component watchers:
                Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  16/Nov/15