Skip to content

Commit

Permalink
Improved README
Browse files Browse the repository at this point in the history
  • Loading branch information
IV1T3 committed Jan 13, 2024
1 parent f7e9e5a commit f1f683d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# django-middleware-fileuploadvalidation
# django-middleware-fileuploadvalidation (DMF)

This Django middleware provides robust validation and sanitization for file uploads. It is designed to ensure the security and integrity of files uploaded through Django applications by performing various checks, validations, and sanitization processes.

Expand All @@ -21,7 +21,7 @@ This Django middleware provides robust validation and sanitization for file uplo
This package can be installed via pip:

```bash
$ pip install django-middleware-fileuploadvalidation
pip install django-middleware-fileuploadvalidation
```

Then add `django_middleware_fileuploadvalidation.middleware.FileUploadValidationMiddleware` to the end of your `MIDDLEWARE` in settings.py.
Expand All @@ -47,7 +47,7 @@ Custom YARA signatures can be placed under `/vendor/yara/`. A collection of usef
DMF also utilizes the ClamAV anti-virus engine. If you would like to enable ClamAV through DMF, follow our ClamAV installation instructions: [ClamAV Install Guide](https://github.com/IV1T3/django-middleware-fileuploadvalidation/blob/main/docs/_CLAMAV_INSTALL_GUIDE.md)

## Configuration
Be default, the upload configuration is set to the following:
By default, the upload configuration is set to the following:
```python
{
"clamav": False,
Expand Down
16 changes: 8 additions & 8 deletions docs/_CLAMAV_INSTALL_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
This package also utilizes the ClamAV anti-virus engine. For this, it is required to have a running instance of the ClamAV daemon.

```bash
$ brew install clamav
$ cd /usr/local/etc/clamav
$ cp freshclam.conf.sample freshclam.conf
$ cp clamd.conf.sample clamd.conf
brew install clamav
cd /usr/local/etc/clamav
cp freshclam.conf.sample freshclam.conf
cp clamd.conf.sample clamd.conf
```

Open `freshclam.conf` and either comment or remove the "Example" line:
Expand All @@ -25,17 +25,17 @@ LocalSocketGroup clamav

Afterwards, update the local ClamAV database.
```bash
$ freshclam
freshclam
```

Restart the clamAV daemon.

### Installing ClamAV on Ubuntu

```bash
$ sudo apt-get install clamav-daemon clamav-freshclam clamav-unofficial-sigs
$ sudo freshclam
$ sudo service clamav-daemon start
sudo apt-get install clamav-daemon clamav-freshclam clamav-unofficial-sigs
sudo freshclam
sudo service clamav-daemon start
```

To further configure your ClamAV daemon, modify either `/etc/clamav/clamd.conf` or `/etc/clamav/freshclam.conf`.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "django-middleware-fileuploadvalidation"
version = "1.0.1"
version = "1.0.2"
description = "A Django middleware to validate user file uploads and detect malicious content."
authors = ["IV1T3 <alexander.groddeck@uni-hamburg.de>"]
readme = "README.md"
Expand Down

0 comments on commit f1f683d

Please sign in to comment.