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

It's possible to bypass the maximum number of attachements by overloading the drag and drop option of the filepicker.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.3.2
    • 2.3
    • Filepicker
    • MOODLE_23_STABLE
    • MOODLE_23_STABLE
    • MDL-33927_enforce_max_attachments
    • Hide
      1. Create a forum and set maximum number of attachments to 3
      2. Create a discussion and drag in 3 files to the attachment
      3. Quickly drag in another file, whilst the original file upload is still processing
      4. Post to the forum

      Expected result - an error message, just above the attachments area, reading 'You must not attach more than 3 files here.'

      Note: you can make testing a lot easier by opening up repository/upload/lib.php, finding the 'process_upload' function and adding the line 'sleep(5);' at the start of it, to get the upload script to wait 5 seconds before responding.

      Show
      Create a forum and set maximum number of attachments to 3 Create a discussion and drag in 3 files to the attachment Quickly drag in another file, whilst the original file upload is still processing Post to the forum Expected result - an error message, just above the attachments area, reading 'You must not attach more than 3 files here.' Note: you can make testing a lot easier by opening up repository/upload/lib.php, finding the 'process_upload' function and adding the line 'sleep(5);' at the start of it, to get the upload script to wait 5 seconds before responding.

      Note: This works best when anti-virus software is enabled and scans uploaded files. This give you more time to drop in more files while it's loading the first batch.
      Replication steps

      1. Create a forum and set maximum number of attachments to 1 or more.
      2. create a discussion and drag in a number of files below the attachment limit. While it's processing those files, drag in another batch below the limit. This can be repeated multiple times. (I managed to drag in eight files in a two attachment limit forum).
      3. Post to the forum.

            davosmith Davo Smith
            abgreeve Adrian Greeve
            Frédéric Massart Frédéric Massart
            Sam Hemelryk Sam Hemelryk
            Andrew Davis Andrew Davis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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