Enabling ClamAV in PrimeFaces FileUpload component

Viewed 89

As PrimeFaces documentantions says, to enable ClamAV in FileUpload we just need:

  • virusScan="true" in component
  • primefaces.virusscan.CLAMAV_HOST context param in web.xml
  • primefaces.virusscan.CLAMAV_PORT context param in web.xml

This is all fine, but ClamAV isn't called.

I enabled PF logging, and the output is:

[org.primefaces.virusscan.VirusScannerService] Performing virus scan...
[org.primefaces.virusscan.VirusScannerService] Skipping virus scan with org.primefaces.virusscan.impl.VirusTotalReportScanner provider since it is disabled
[org.primefaces.virusscan.VirusScannerService] No virus detected

As we can see VirusScannerService do not list ClamAV service as an option.

VirusScannerService uses java.util.ServiceLoader to find services available in class loader.

Any clues why it can't load the service?

PrimeFaces 11.0.

1 Answers
Related