Download the PHP package jord-jd/laravel-malware-validation-rule without Composer
On this page you can find all versions of the php package jord-jd/laravel-malware-validation-rule. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jord-jd/laravel-malware-validation-rule
More information about jord-jd/laravel-malware-validation-rule
Files in jord-jd/laravel-malware-validation-rule
Package laravel-malware-validation-rule
Short Description Scans uploaded files for viruses and other malware
License LGPL-3.0-only
Informations about the package laravel-malware-validation-rule
Laravel Malware Validation Rule
The Laravel Malware Validation Rule package provides a validation rule that scans uploaded files for viruses and other malware.
Supports Laravel 5.1 through 13 and PHP 7.2 through current releases.
Installation
To install the Laravel Malware Validation Rule package, run the following command
This package makes use of the ClamAV daemon to perform virus/malware scanning. You can install ClamAV in Ubuntu/Debian with the following command.
Your ClamAV installation should automatically update virus defintions. However, you can
update your ClamAV virus definitions manually using the freshclam command.
It is recommended to restart the ClamAV daemon after the virus definitions have
been updated to ensure they take effect.
Usage
See the following basic usage example, which demonstrates how to validate a basic file upload does not contain contain a known virus/malware.
For non-default ClamAV installations, inject a configured scanner. Unix sockets and TCP socket URIs are supported by the underlying client:
Connection, daemon, and unreadable-file failures are normalised to MalwareScanFailedException; applications can report or retry these separately from an infected-file validation failure.
By default the validation rule message will include the name of the detected virus/malware. If you do not wish the malware name to be shown in the validation message you can turn this off as shown below.
All versions of laravel-malware-validation-rule with dependencies
php Version >=7.2
xenolope/quahog Version ^2.1