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

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

XMLWordPrintable

    • MOODLE_39_STABLE
    • MOODLE_39_STABLE
    • MDL-67504-Master
    • Hide

      Setup email to receive Moodle notification

      1. Ensure that mailcatcher / mailhog / outgoing e-mail is configured

      Enable Clamav

      1. Navigate to Site administration -> Plugins -> Antivirus
      2. Enable clamav on Moodle site
      3. Specify an INVALID path to clamscan (This will cause error while scanning), for example:

        /this/is/fake
        

      Enable retries

      # Go to Site Admin > Plugins > Antivirus > ClamAV Antivirus

      1. Set "Scanning Attempts" to "3"

      Upload file

      1. Upload any file to your private files

      Expected behaviour

      1. Admin users should receive one email with content:

        Clamav scanning has tried 3 time(s).
         
        Path to ClamAV, /this/is/fake , is invalid.
        

      Show
      Setup email to receive Moodle notification Ensure that mailcatcher / mailhog / outgoing e-mail is configured Enable Clamav Navigate to Site administration -> Plugins -> Antivirus Enable clamav on Moodle site Specify an INVALID path to clamscan (This will cause error while scanning), for example: /this/is/fake Enable retries # Go to Site Admin > Plugins > Antivirus > ClamAV Antivirus Set "Scanning Attempts" to "3" Upload file Upload any file to your private files Expected behaviour Admin users should receive one email with content: Clamav scanning has tried 3 time(s).   Path to ClamAV, /this/is/fake , is invalid.

      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

            Nguyen Nathan Nguyen
            brendanheywood Brendan Heywood
            Brendan Heywood Brendan Heywood
            Andrew Lyons Andrew Lyons
            Janelle Barcega Janelle Barcega
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 43 minutes
                43m

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