Skip to content

Throw an error in fileScan() in case of ClamAV error rather than returning true #36

@perk11

Description

@perk11

I've had an issue where a mount wasn't working in a docker container with ClamAV, so SCAN command was returning something like this:
/clamav_tmp/file.docx: File path check failure: No such file or directory

I've been using fileScan() in php-clamav and since it did not find 'OK' in ClamAV output, it returned true which led to all files scanned being silently marked as having a virus.

I think this should instead have caused an Exception, so that it's clear that there is an issue with the scanning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions