- Issue created by @o'briat
Since FileValidations
events could access and manipulate uploaded file before ClamAv as a chance to scan it, this module must make it sure that ClamAv is the first event triggered and in case o f virus detection, all remaining events should be skipped.
See https://www.drupal.org/project/clamav/issues/3058018 🐛 Use of Max Resolution on Image Field causes ClamAV Timeout in Deamon mode Needs review
Increase priority on FileValidationSubscriber
:
https://git.drupalcode.org/project/clamav/-/blob/2.1.x/src/EventSubscrib...
FileValidationEvent::class => ['onFileValidate', 9999],
Skip other events on Drupal\clamav\EventSubscriber\FileValidationSubscriber::onFileValidate
, at least at this line
https://git.drupalcode.org/project/clamav/-/blob/2.1.x/src/EventSubscrib...
$event->stopPropagation();
Maybe add an option to configure if it should also fail on FILE_IS_UNCHECKED
none
none
none
Active
2.1
Code