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

Allow virus checks to be retried if they returned an error state

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Development in progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.9
    • Fix Version/s: None
    • Component/s: Files API
    • Testing Instructions:
      Hide

      Setup email to receive Moodle notification

      1. Outgoing mail: https://docs.moodle.org/38/en/Mail_configuration
      2. Assigns yourself as a site admin

      Enable Clamav

      1. Install clamav, do not update database (so that it will cause error)
      2. Enable clamav on Moodle site
      3. Specify path to clamscan

      Enable retries:

      1.  ** Go to Site Admin > Plugins > Antivirus >Common settings
      2. Set "Retry Scanning" to "2"

      Upload file:

      1. Upload any file to your private files

      Expected behavior:

      1. You should receive 3 email regards the clamav error (1 for normal scan + 2 for retries) 

       

       

       

      Show
      Setup email to receive Moodle notification Outgoing mail: https://docs.moodle.org/38/en/Mail_configuration Assigns yourself as a site admin Enable Clamav Install clamav, do not update database (so that it will cause error) Enable clamav on Moodle site Specify path to clamscan Enable retries:  ** Go to Site Admin > Plugins > Antivirus >Common settings Set "Retry Scanning" to "2" Upload file: Upload any file to your private files Expected behavior: You should receive 3 email regards the clamav error (1 for normal scan + 2 for retries)       
    • Affected Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
      MDL-67504-Master

      Description

      Sometimes a virus clamav socket doesn't repsond, which spams the entire list of admins with an email they can't do much about.

      Handling the email better is covered by MDL-66222. This issue is about making it more forgiving and just retrying the virus check that failed, maybe 2 or 3 times before giving up.

      Also extra debugging info in the email:

      1) size of the files (as well as it's path)

      2) it's sha1 hash

      3) anything else we have handy, eg it's mimetype and ideally it's original filename

      4) the user id who uploaded it

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Nguyen Nathan Nguyen
                Reporter:
                brendanheywood Brendan Heywood
                Peer reviewer:
                Brendan Heywood
                Participants:
                Component watchers:
                Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: