diff options
author | Robin Appelman <robin@icewind.nl> | 2021-12-13 18:55:54 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-12-13 18:55:54 +0300 |
commit | 994f109922e6440a85f17c3ba660e50af6fa4768 (patch) | |
tree | 8233f957892110fba2d2c98ea422d2d8b7fae3f6 /lib | |
parent | ee1ad0d723e132a5d1b48b534a85f1e63c3cdef3 (diff) |
handle password protected files as 'scanned' in kaspersky
since there is nothing kaspersky can do with the files there is no use in retrying the scan later, just to get the same result
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Scanner/ExternalKaspersky.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Scanner/ExternalKaspersky.php b/lib/Scanner/ExternalKaspersky.php index 25b9a6d..541876e 100644 --- a/lib/Scanner/ExternalKaspersky.php +++ b/lib/Scanner/ExternalKaspersky.php @@ -85,7 +85,12 @@ class ExternalKaspersky extends ScannerBase { if (substr($response, 0, 5) === 'CLEAN' && $this->status->getNumericStatus() != Status::SCANRESULT_INFECTED) { $this->status->setNumericStatus(Status::SCANRESULT_CLEAN); } elseif (substr($response, 0, 11) === 'NON_SCANNED' && $this->status->getNumericStatus() != Status::SCANRESULT_INFECTED) { - $this->status->setNumericStatus(Status::SCANRESULT_UNCHECKED); + if ($response === 'NON_SCANNED (PASSWORD PROTECTED)') { + // if we can't scan the file at all, there is no use in trying to scan it again later + $this->status->setNumericStatus(Status::SCANRESULT_CLEAN); + } else { + $this->status->setNumericStatus(Status::SCANRESULT_UNCHECKED); + } $this->status->setDetails($response); } else { $this->status->setNumericStatus(Status::SCANRESULT_INFECTED); |