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

post_max_size limits upload size from all respositories

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.0.5
    • 2.9.5, 3.0.3
    • Filepicker, Repositories
    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • MOODLE_30_STABLE
    • MDL-54110_master
    • Hide

      Set up:

      • Set post_max_size and max_upload_size in php.ini to something small e.g. 1M.
      • You will need a file smaller than this limit (File 1), and a file larger than this limit (File 2).
      • You will need a user who does not have moodle/course:ignorefilesizelimits (User 1) and one who does (User 2).
      • You will need a course that both users can edit
      • Create an instance of the File System repository, and place both files in the directory that it points to.
      1. Log in as User 1
      2. Go to a course and create a File resource.
      3. Attempt to drag-and-drop File 1 on to the Select Files file manager
      4. The file should be attached to the file manager
      5. Click on the file in the file manager and delete it.
      6. Attempt to drag-and-drop File 2 on to the Select Files file manager
      7. You should see the error message "The file File 2 is larger than the maximum size allowed."
      8. Click on the "Add..." icon in the File manager
      9. Using the Upload a file repository, attempt to upload File 1
      10. The file should be attached to the file manager
      11. Click on the file in the file manager and delete it.
      12. Click on the "Add..." icon in the File manager
      13. Using the Upload a file repository, attempt to upload File 2
      14. You should see the error message "The file you tried to upload is too large for the server to process."
      15. Using the File system repository instance you created, attempt to upload File 1
      16. The file should be attached to the file manager
      17. Click on the file in the file manager and delete it.
      18. Click on the "Add..." icon in the File manager
      19. Using the File system repository instance you created, attempt to upload File 2
      20. You should see the error message "The file is larger than the maximum size allowed."
      21. Log out
      22. Log in as User 2
      23. Go to a course and create a File resource.
      24. Attempt to drag-and-drop File 1 on to the Select Files file manager
      25. The file should be attached to the file manager
      26. Click on the file in the file manager and delete it.
      27. Attempt to drag-and-drop File 2 on to the Select Files file manager
      28. You should see the error message "The file File 2 is larger than the maximum size allowed."
      29. Click on the "Add..." icon in the File manager
      30. Using the Upload a file repository, attempt to upload File 1
      31. The file should be attached to the file manager
      32. Click on the file in the file manager and delete it.
      33. Click on the "Add..." icon in the File manager
      34. Using the Upload a file repository, attempt to upload File 2
      35. You should see the error message "The file you tried to upload is too large for the server to process."
      36. Using the File system repository instance you created, attempt to upload File 1
      37. The file should be attached to the file manager
      38. Click on the file in the file manager and delete it.
      39. Click on the "Add..." icon in the File manager
      40. Using the File system repository instance you created, attempt to upload File 2
      41. The file should be attached to the file manager
      Show
      Set up: Set post_max_size and max_upload_size in php.ini to something small e.g. 1M. You will need a file smaller than this limit ( File 1 ), and a file larger than this limit ( File 2 ). You will need a user who does not have moodle/course:ignorefilesizelimits ( User 1 ) and one who does ( User 2 ). You will need a course that both users can edit Create an instance of the File System repository, and place both files in the directory that it points to. Log in as User 1 Go to a course and create a File resource. Attempt to drag-and-drop File 1 on to the Select Files file manager The file should be attached to the file manager Click on the file in the file manager and delete it. Attempt to drag-and-drop File 2 on to the Select Files file manager You should see the error message "The file File 2 is larger than the maximum size allowed." Click on the "Add..." icon in the File manager Using the Upload a file repository, attempt to upload File 1 The file should be attached to the file manager Click on the file in the file manager and delete it. Click on the "Add..." icon in the File manager Using the Upload a file repository, attempt to upload File 2 You should see the error message "The file you tried to upload is too large for the server to process." Using the File system repository instance you created, attempt to upload File 1 The file should be attached to the file manager Click on the file in the file manager and delete it. Click on the "Add..." icon in the File manager Using the File system repository instance you created, attempt to upload File 2 You should see the error message "The file is larger than the maximum size allowed." Log out Log in as User 2 Go to a course and create a File resource. Attempt to drag-and-drop File 1 on to the Select Files file manager The file should be attached to the file manager Click on the file in the file manager and delete it. Attempt to drag-and-drop File 2 on to the Select Files file manager You should see the error message "The file File 2 is larger than the maximum size allowed." Click on the "Add..." icon in the File manager Using the Upload a file repository, attempt to upload File 1 The file should be attached to the file manager Click on the file in the file manager and delete it. Click on the "Add..." icon in the File manager Using the Upload a file repository, attempt to upload File 2 You should see the error message "The file you tried to upload is too large for the server to process." Using the File system repository instance you created, attempt to upload File 1 The file should be attached to the file manager Click on the file in the file manager and delete it. Click on the "Add..." icon in the File manager Using the File system repository instance you created, attempt to upload File 2 The file should be attached to the file manager

      Changes made in MDL-44626 mean that post_max_size is now the hard upload limit for all repositories, including those that don't use post requests (e.g. File System), regardless of the user's permissions.

      Steps to reproduce:

      1. Set post_max_size to a small value in php.ini (e.g. 1M)
      2. Set up the File System repository with a folder containing a file larger than post_max_size.
      3. As a user with `moodle/course:ignorefilesizelimits`, attempt to attach the file to any File Manager field through the File System repository.
      4. Get a message informing you that the file is too large.

      As MDL-44626 was an issue regarding error messages, this appears to be an unintended regression.

            marxjohnson Mark Johnson
            marxjohnson Mark Johnson
            Tim Hunt Tim Hunt
            Andrew Lyons Andrew Lyons
            Jake Dallimore Jake Dallimore
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.