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

Cache api should not use PARAM_SAFEDIR

    XMLWordPrintable

Details

    • MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-75375-311
    • MDL-75375-400
    • MDL-75375-master
    • Hide
      1. Go to cache admin /cache/admin.php
      2. Click Add instance for a File cache store
      3. Enter an absolute path eg /tmp/moodlecache and a name
      4. Tick "Auto create directory"
      5. Save, then edit the instance and confirm the path is as you entered with the leading /
      6. Check the contents of the /tmp folder.
      7. Confirm that it contains a moodlecache folder.
      8. Repeat step 3 with a windows style path c:\temp\moodlecache
      9. Deselect "Auto create directory"
      10. Save (Ignore the warnings)
      11. Edit the instance and confirm the path is as you entered with the leading c:\temp\moodlecache
      Show
      Go to cache admin /cache/admin.php Click Add instance for a File cache store Enter an absolute path eg /tmp/moodlecache and a name Tick "Auto create directory" Save, then edit the instance and confirm the path is as you entered with the leading / Check the contents of the /tmp folder. Confirm that it contains a moodlecache folder. Repeat step 3 with a windows style path c:\temp\moodlecache Deselect "Auto create directory" Save (Ignore the warnings) Edit the instance and confirm the path is as you entered with the leading c:\temp\moodlecache

    Description

      Setting an absolute path in the file store cache no longer works due to improved cleaning rules in PARAM_SAFEDIR and the cache should never have used with param type in the first place.

      Attachments

        1. MDL-75375_master_1.png
          MDL-75375_master_1.png
          72 kB
        2. MDL-75375_master_2.png
          MDL-75375_master_2.png
          266 kB
        3. MDL-75375_master_3.png
          MDL-75375_master_3.png
          89 kB
        4. MDL-75375_v311_1.png
          MDL-75375_v311_1.png
          71 kB
        5. MDL-75375_v311_2.png
          MDL-75375_v311_2.png
          249 kB
        6. MDL-75375_v311_3.png
          MDL-75375_v311_3.png
          91 kB
        7. MDL-75375_v400_1.png
          MDL-75375_v400_1.png
          70 kB
        8. MDL-75375_v400_2.png
          MDL-75375_v400_2.png
          272 kB
        9. MDL-75375_v400_3.png
          MDL-75375_v400_3.png
          88 kB
        10. MDL-75375-cache-path.patch
          0.9 kB

        Activity

          People

            brendanheywood Brendan Heywood
            brendanheywood Brendan Heywood
            Petr Skoda Petr Skoda
            Jun Pataleta Jun Pataleta
            Angelia Dela Cruz Angelia Dela Cruz
            Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              22/Aug/22

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 15 minutes
                2h 15m