Issues with file upload and antivirus plugin

Description

Details at https://community.mattermost.com/core/pl/xsdtk7ymzpbife5u6bkoc493so

hey chris, we're using your antivirus plugin at UTC so thanks so much for offering it! quick question: we were just redeploying it in a 5.9 environment. It seems to work catching the test virus file, but we get an odd error:
{"level":"warn","ts":1553814843.1319351,"caller":"app/plugin_api.go:659","msg":"Virus found in file.","plugin_id":"antivirus","filename":"eicar.test","user":"c343m413g3n1xruspfs8amjr3a","scan_result":"stream: Eicar-Test-Signature FOUND"}
{"level":"error","ts":1553814843.2795095,"caller":"web/context.go:52","msg":"Unable to upload file(s). Error reading or parsing request data.","path":"/api/v4/files","request_id":"miejbobtxb8aznzxo3icob16hw","ip_addr":"10.192.164.188","user_id":"c343m413g3n1xruspfs8amjr3a","method":"POST","err_where":"uploadFileTask","http_code":400,"err_details":"Virus found in file."}
{"level":"info","ts":1553814856.8359334,"caller":"scheduler/worker.go:78","msg":"Worker: Job is complete","worker":"Plugins","job_id":"7c3maxtobf8ytgt917uenuguwr"}

QA Test Steps

Activity

Show:
Lindy Isherwood
April 15, 2019, 7:30 AM

Have pinged Lev to ask about testing on this ticket.

Lindy Isherwood
April 15, 2019, 5:31 PM

Lev has added QA test steps.

Dylan Haussermann
April 15, 2019, 11:42 PM

I built the blugin from the repo and enabled it on postgres.test.mattermost.com running v5.10-release

, Once enabled that plug-in is rejecting ALL file attachments on posts. When I try to upload something like PlainText.txt which has only plain text in it I still get "Unable to upload file PlainTextFile.txt. Rejected by plugin: Error while scanning for viruses."

Could this be because the value Clamav Host and Port must be set to something meaningful where a service exist that can scan the file? Perhaps this is the only message you get back with out installation of an actual malware scanner as you mentioned in the steps above.

For now I have disabled this on the postgres server.

Lev Brouk
April 16, 2019, 1:33 AM

Yes this is expected. The plugin can not connect to its backend, throws an error, and declines the upload.

Dylan Haussermann
April 16, 2019, 2:41 PM
  • Tested current version of the plug-in from the repo

  • Plugin enables successfully

Plug-in is functional. No further testing is possible without configuring malware scanner.

This task can be closed.

Done

Mana

None

Assignee

Lev Brouk

QA Assignee

Dylan Haussermann

Reporter

Lev Brouk

Epic Link

None

Fix versions

Mattermost Team

Integrations

Sprint

None

Labels

None

QA Testing Areas

None

GitHub Issue

None

Components

None

Severity

None
Configure