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

Antivirus: Implement plugins infrastructure for antivirus and create ClamAV plugin.

XMLWordPrintable

    • MOODLE_30_STABLE
    • MOODLE_31_STABLE
    • MDL-50887-master
    • Hide

      Setup

      1. Configure SMTP in Site administration ► Plugins ► Message outputs ► Email

      Testing plugin installation and upgrade:
      1. Make sure you have clamav scanning enabled and configured (runclamonupload is ticked, pathtoclam setting is set to clamav path) prior to upgrade.
      2. Go through upgrade process.
      3. Navigate to "Site Administation" > Plugins > Antiviruses > Manage antiviruses.
      4. Observe that ClamAV plugin is enabled.
      5. Click on ClamAV plugin settings, observe that 'pathtoclam' and other settings were preserved.

      Testing virus scanning:
      1. Open any file-picking interface and try to upload file not containing the virus, the file should be uploaded successfully.
      2. Open any file-picking interface and try to upload file containing the virus, this could be EICAR test signature in the text file (see https://en.wikipedia.org/wiki/EICAR_test_file for details), you should get an exception on upload containing the message that your file contains the virus and can't be uploaded.
      3. Go to ClamAV settings and modify 'pathtoclam' so that it points to the wrong path, and 'clamfailureonupload' is set to "Treat files as OK". Save settings.
      4. Open any file-picking interface and try to upload any file, the file should be uploaded successfully. Admin should get email notification that antivirus is not configured correctly.
      5. Go to ClamAV settings and modify 'clamfailureonupload', set it to "Treat files as viruses". Save settings.
      6. Open any file-picking interface and try to upload any file, the file should trigger an exception similar to one in step 2. Admin should get email notification that antivirus is not configured correctly.

      Show
      Setup Configure SMTP in Site administration ► Plugins ► Message outputs ► Email Testing plugin installation and upgrade: 1. Make sure you have clamav scanning enabled and configured (runclamonupload is ticked, pathtoclam setting is set to clamav path) prior to upgrade . 2. Go through upgrade process. 3. Navigate to "Site Administation" > Plugins > Antiviruses > Manage antiviruses. 4. Observe that ClamAV plugin is enabled. 5. Click on ClamAV plugin settings, observe that 'pathtoclam' and other settings were preserved. Testing virus scanning: 1. Open any file-picking interface and try to upload file not containing the virus , the file should be uploaded successfully. 2. Open any file-picking interface and try to upload file containing the virus , this could be EICAR test signature in the text file (see https://en.wikipedia.org/wiki/EICAR_test_file for details), you should get an exception on upload containing the message that your file contains the virus and can't be uploaded. 3. Go to ClamAV settings and modify 'pathtoclam' so that it points to the wrong path, and 'clamfailureonupload' is set to "Treat files as OK". Save settings. 4. Open any file-picking interface and try to upload any file, the file should be uploaded successfully. Admin should get email notification that antivirus is not configured correctly. 5. Go to ClamAV settings and modify 'clamfailureonupload', set it to "Treat files as viruses". Save settings. 6. Open any file-picking interface and try to upload any file, the file should trigger an exception similar to one in step 2. Admin should get email notification that antivirus is not configured correctly.

      This task will bring antivirus plugins infrastructure to core and move existing ClamAV scanning functionality to plugin level. The improvement does not bring any new features, it is merely a re-factoring of existing functionality.

            kabalin Ruslan Kabalin
            kabalin Ruslan Kabalin
            David Monllaó David Monllaó
            Dan Poltawski Dan Poltawski
            Jun Pataleta Jun Pataleta
            Votes:
            2 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

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