Scan files uploaded via WebDav using ICAP

Nextcloud version (eg, 20.0.5): 26.02
Operating system and version (eg, Ubuntu 20.04): 22.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.52
PHP version (eg, 7.4): 8.1.2

The issue you are facing:

When synchronizing files and directories containing malware with the Nextcloud client, these files are stored on the Nextcloud without being checked by the ICAP server.

If I upload the same files and directories via browser, they are detected and blocked by the ICAP server.

I would like to know how to get the Anti Virus App to also check the file upload via WebDav with the ICAP server.

Otherwise this would be a fatal security problem, because the files can be downloaded afterwards via the browser without any problems.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Install the AntiVirus App
  2. Configure an ICAP server
  3. Upload files and directories that contain malware. You will receive an error message that these files could not be uploaded. So this is exactly the behavior you want.
  4. Use Nextcloud client to synchronize files and directories that contain malware
  5. Look in the Nextcloud, there you will find all the files that should not be there, because they contain malware :slight_smile:

I think you should ask the provider of your ICAP server instead of raising the question here, because Nextcloud is only an application working on top of a web server with PHP enabled.
I don’t think that someone in this Forum will be able to tell you how you need to configure your ICAP and web server to get all files scanned before Nextcloud stores them on the hard disk.