Skip to content
Snippets Groups Projects

Issue #3315943: Creating README.md File for the Module

6 unresolved threads
README.md 0 → 100644
+ 46
0
# FILE UPLOAD SECURE VALIDATOR
* Introduction
* Dependencies
* Installation
* Configuration
* Maintainers
## Introduction
- This is a very simple and small module which performs a server side validation
for the extension of an uploaded file of any content type's file field.
Default Drupal MIME-detection relies on the file's extension.
- 'File Upload Secure Validator' uses the PHP library 'fileinfo' and is dependent
on that. Therefore the server hosting the Drupal instance should have this
library enabled. Through this PHP lib we can perform a more secure and reliable
check on the file's MIME type and compare that to the allowed file extensions,
as these are set by the admin within the content type's field settings.
This module is useful when we need to enforce a maximum security MIME type detection.
## Dependencies
The module depends on the PHP library fileinfo. Please make sure this
library is present and enabled on the server.
## Installation
* Install the File Upload Secure Validator module as you would normally install a
contributed Drupal module. Visit
[Installing Modules](https://www.drupal.org/docs/extending-drupal/installing-modules)
for further information.
## Configuration
- Enable the File Upload Secure Validator module on the modules page.
- Configure the File Upload Secure Validator at (/admin/config/media/file_upload_secure_validator).
    • Only this is relevant for "Configuration", the other two points could move into the "Installation" chapter. The relevant point can be expanded to explain shortly what kind of configuration can take place via the Admin UI, namely, the configuration of MIME-types equivalence groups. An equivalence group is used to detect an agreement between fileinfo MIME-type detection and file extension MIME-type detection. A disagreement is handled as a suspicious error, e.g. a *.txt file that contains binary data.

      • Could you explain little deeper. Im not getting it.

      • | - Enable the File Upload Secure Validator module on the modules page.
        This belongs more to the "Installation" section

        | - After enabling the module, it will perform an alternative server side extension validation on every uploaded file of every content type file field.
        Same here; this is not relevant to the "Configuration" section.

        | - Configure the File Upload Secure Validator at (/admin/config/media/file_upload_secure_validator).
        This can be expanded to describe things with a little more detail, e.g.: "... what kind of configuration can take place via the Admin UI, namely, the configuration of MIME-types equivalence groups. An equivalence group is used to detect an agreement between fileinfo MIME-type detection and file extension MIME-type detection. A disagreement is handled as a suspicious error, e.g. a *.txt file that contains binary data."

      • Please register or sign in to reply
Please register or sign in to reply
- After enabling the module, it will perform an alternative server side extension
validation on every uploaded file of every content type file field.
## Maintainers
Current maintainers:
- Stefanos Petrakis (stefanos.petrakis) - <https://www.drupal.org/u/stefanospetrakis>
- Giannis Pagonas (_dcre_) - <https://www.drupal.org/u/_dcre_>
Loading