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

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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.1
    • Component/s: Filepicker
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Epic Link:
    • Pull Master Branch:
      MDL-50887-master

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  23/May/16