appwrite / appwrite/php-clamav
Throw an error in fileScan() in case of ClamAV error rather than returning `true`
Open
- Dominant language
- PHP
- Stars
- 73
- Forks
- 31
- Avg merge
- 30m
- Merged PRs (30d)
- 2
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.