owncloud / owncloud/android

Improve error when virus is detected

Open
#3,115 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

UI / UX
Dominant language
Kotlin
Stars
4.2k
Forks
3.1k
Avg merge
1d 12h
Merged PRs (30d)
7

Description

Check these steps out:

  1. Install files_antivirus in the server, and enable it
  2. Upload virused file (eicar.com) with the android app

Current:

Notification shows correctly that the virus was detected:

Screenshot 2021-02-25 at 09 05 24

But, the upload list shows only Upload not allowed:

Screenshot 2021-02-25 at 09 05 47

The PUT response is 403 Forbidden with Payload:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:o="http://owncloud.org/ns">
  <s:exception>OCA\DAV\Connector\Sabre\Exception\Forbidden</s:exception>
  <s:message>Virus Win.Test.EICAR_HDB-1 is detected in the file. Upload cannot be completed.</s:message>
  <o:retry xmlns:o="o:">false</o:retry>
  <o:reason xmlns:o="o:">Virus Win.Test.EICAR_HDB-1 is detected in the file. Upload cannot be completed.</o:reason>
</d:error>

Expected: Both notification and uploads view show the same accurate error. That should the expected behaviour for all errors.

Related: https://github.com/owncloud/icap/issues/21

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the upload with files_antivirus enabled and eicar.com, then inspect how the Android app handles the PUT 403 response in the uploads view and notification paths. Compare both displays with the response message; done means they show the specific virus error rather than only “Upload not allowed.”

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.